Skip to content
This repository was archived by the owner on Apr 11, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source "http://rubygems.org"

gem "colored"
gem "chunky_png"
gem "oily_png"

group :test do
gem "cucumber", "0.10.2"
Expand Down
55 changes: 31 additions & 24 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ GEM
childprocess (>= 0.1.7)
cucumber (>= 0.10.0)
rspec (>= 2.5.0)
builder (3.0.0)
builder (3.2.2)
capybara (0.4.1.2)
celerity (>= 0.7.9)
culerity (>= 0.2.4)
Expand All @@ -17,10 +17,10 @@ GEM
xpath (~> 0.1.3)
capybara-webkit (0.3.0)
capybara (~> 0.4.1)
celerity (0.8.9)
childprocess (0.1.9)
ffi (~> 1.0.6)
chunky_png (1.2.0)
celerity (0.9.2)
childprocess (0.5.2)
ffi (~> 1.0, >= 1.0.11)
chunky_png (1.3.0)
colored (1.2)
cucumber (0.10.2)
builder (>= 2.1.2)
Expand All @@ -29,32 +29,39 @@ GEM
json (>= 1.4.6)
term-ansicolor (>= 1.0.5)
culerity (0.2.15)
diff-lcs (1.1.2)
ffi (1.0.8)
gherkin (2.3.7)
json (>= 1.4.6)
json (1.5.1)
json_pure (1.5.1)
mime-types (1.16)
nokogiri (1.4.4)
rack (1.2.2)
rack-test (0.6.0)
diff-lcs (1.1.3)
ffi (1.9.3)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me:

$ bundle install --deployment
Fetching gem metadata from http://rubygems.org/.........
Fetching additional metadata from http://rubygems.org/..
Installing ffi 1.9.3
Installing childprocess 0.5.2
Installing builder 3.2.2
Installing diff-lcs 1.1.3
Installing multi_json 1.9.2
Installing gherkin 2.12.2
Using json 1.8.1
Installing tins 1.0.1
Installing term-ansicolor 1.3.0
Installing cucumber 0.10.2
Installing rspec-core 2.6.4
Installing rspec-expectations 2.6.0
Installing rspec-mocks 2.6.0
Installing rspec 2.6.0
Installing aruba 0.3.6
Installing celerity 0.9.2
Installing culerity 0.2.15
Installing mime-types 2.2
Installing mini_portile 0.5.3
Installing nokogiri 1.6.1
Installing rack 1.5.2
Installing rack-test 0.6.2
Installing rubyzip 1.1.2
Installing websocket 1.0.7
Installing selenium-webdriver 2.41.0
Installing xpath 0.1.4
Installing capybara 0.4.1.2
Installing capybara-webkit 0.3.0
Installing chunky_png 1.3.0
Installing colored 1.2
Installing oily_png 1.1.1
Using bundler 1.6.1
Your bundle is complete!

gherkin (2.12.2)
multi_json (~> 1.3)
json (1.8.1)
mime-types (2.2)
mini_portile (0.5.3)
multi_json (1.9.2)
nokogiri (1.6.1)
mini_portile (~> 0.5.0)
oily_png (1.1.1)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oily_png wraps chunky_png

chunky_png (~> 1.3.0)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rspec (2.6.0)
rspec-core (~> 2.6.0)
rspec-expectations (~> 2.6.0)
rspec-mocks (~> 2.6.0)
rspec-core (2.6.0)
rspec-core (2.6.4)
rspec-expectations (2.6.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)
rubyzip (0.9.4)
selenium-webdriver (0.2.0)
childprocess (>= 0.1.7)
ffi (>= 1.0.7)
json_pure
rubyzip
term-ansicolor (1.0.5)
rubyzip (1.1.2)
selenium-webdriver (2.41.0)
childprocess (>= 0.5.0)
multi_json (~> 1.0)
rubyzip (~> 1.0)
websocket (~> 1.0.4)
term-ansicolor (1.3.0)
tins (~> 1.0)
tins (1.0.1)
websocket (1.0.7)
xpath (0.1.4)
nokogiri (~> 1.3)

Expand All @@ -65,7 +72,7 @@ DEPENDENCIES
aruba (= 0.3.6)
capybara (= 0.4.1.2)
capybara-webkit (= 0.3.0)
chunky_png
colored
cucumber (= 0.10.2)
oily_png
rspec (= 2.6.0)
7 changes: 5 additions & 2 deletions lib/blueprint/compressor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Compressor
"parts/grid.html",
"parts/sample.html"]

attr_accessor :namespace, :custom_css, :custom_layout, :semantic_classes, :project_name, :plugins, :custom_tests_path
attr_accessor :namespace, :custom_css, :custom_layout, :semantic_classes, :project_name, :plugins, :custom_tests_path, :do_grid_png
attr_reader :custom_path, :loaded_from_settings, :destination_path, :script_name

# overridden setter method for destination_path
Expand All @@ -30,6 +30,7 @@ def initialize
self.custom_css = {}
self.semantic_classes = {}
self.plugins = []
self.do_grid_png = false

self.options.parse!(ARGV)
initialize_project_from_yaml(self.project_name)
Expand Down Expand Up @@ -67,6 +68,8 @@ def options #:nodoc:#
"Set a new column count for the output grid") {|cc| self.custom_layout.column_count = cc }
o.on( "--custom_tests_path=TESTS_OUTPUT_PATH", String,
"Define a different path to output generated test files to") {|test_path| self.custom_tests_path = test_path }
o.on( "-g", "--grid",
"Generate grid PNG") { self.do_grid_png = true }
#o.on("-v", "--verbose", "Turn on verbose output.") { |$verbose| }
o.on("-h", "--help", "Show this help message.") { puts o; exit }
end
Expand Down Expand Up @@ -143,7 +146,7 @@ def generate_css_files
# append semantic class names if set
append_semantic_classes

generate_grid_png
generate_grid_png if self.do_grid_png
end

def append_custom_css(css, current_file_name)
Expand Down
2 changes: 1 addition & 1 deletion lib/blueprint/semantic_class_names.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def css_from_assignments(assignments = {})

# set the semantic class to the rules gathered in classes, sorted by index
# this way, the styles will be applied in the correct order from top of file to bottom
output_css[semantic_class] = "#{classes.sort_by {|i| i[:idx] }.map {|i| i[:rules] }}"
output_css[semantic_class] = classes.sort_by {|i| i[:idx] }.map {|i| i[:rules] }.join
end

# return the css in proper format
Expand Down
2 changes: 1 addition & 1 deletion lib/compress.rb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby
require File.join(File.dirname(__FILE__), "blueprint", "blueprint")
require_relative File.join("blueprint", "blueprint.rb")

# **Basic
#
Expand Down