coderbits 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c7a25f426cf29818d22d8116704b55ed76cc6bbe
4
- data.tar.gz: f342a83bb9ff776a1d4d75fcdaa94c56e4366b5f
3
+ metadata.gz: a4e0049c3c53f1a9a7d60e7641d687457f8b4e91
4
+ data.tar.gz: 8efd2cdbc2ceeb5407d24479d33159c69d0eae54
5
5
  SHA512:
6
- metadata.gz: 3a250d1acc51aa355da3e3c9f39095815e9a0518648d37ed608c48d5a72ad523835a45898f4374322363a7950593d02cd3b7dde02a9a034504cab73f47fa226a
7
- data.tar.gz: 9e9317aec34d3e9397176d58f4474f145d93f940abb338d804603e0117bbdaa3a25d26f9ce19438bb3f4e14f5c622a5b760e0a0b6be55e7d908064830d73288d
6
+ metadata.gz: c84856626af07e1f24de4e5d6ab3cd8c987aa8fb584703b769362719d070b870634ced894f6dc45de946d1eb05fbc3f7fcca5477730798f0533358040b9d4681
7
+ data.tar.gz: ceb6e5e36152a0a0361c9dc2ccdd49ce0f725e654511b80adb18e74ba829a132e9421b1f40824f742b8889a67ce08ba56a13cf990e3c28ab7948483f54c3558c
@@ -1,3 +1,9 @@
1
+ ### 0.0.3
2
+
3
+ * :save_to fix
4
+ * Remove :with and :height
5
+ * Add some specs
6
+
1
7
  ### 0.0.2
2
8
 
3
9
  * Refactor
data/README.md CHANGED
@@ -42,8 +42,6 @@ __Glue options__:
42
42
  :nocomments # suppress generation of comments in output stylesheet
43
43
  :output_image # output location for generated image
44
44
  :output_style # output location for generated stylesheet
45
- :width # fix width of each sprite to a specific size
46
- :height # fix height of each sprite to a specific size
47
45
  ```
48
46
 
49
47
  ### Copyright
@@ -72,7 +72,7 @@ module Coderbits
72
72
  badge_size: 64, # badges size for download
73
73
  save_to: './', # path for files
74
74
 
75
- layout: 'packed', # horizontal, vertical or packed
75
+ layout: 'horizontal', # horizontal, vertical or packed
76
76
  style: 'css', # css, scss or sass
77
77
  library: 'chunkypng', # rmagick or chunkypng
78
78
  selector: '.badge-', # selector
@@ -81,11 +81,14 @@ module Coderbits
81
81
  nocomments: true # suppress generation of comments in output stylesheet
82
82
  }
83
83
 
84
- dflt[:output_image] = "#{dflt[:save_to]}/badges.png" # output location for generated image
85
- dflt[:output_style] = "#{dflt[:save_to]}/badges.css" # output location for generated stylesheet
86
-
87
- dflt[:width] = dflt[:badge_size] # fix width of each sprite to a specific size
88
- dflt[:height] = dflt[:badge_size] # fix height of each sprite to a specific size
84
+ if options.has_key? :save_to
85
+ save_to = options[:save_to]
86
+ else
87
+ save_to = dflt[:save_to]
88
+ end
89
+
90
+ dflt[:output_image] = "#{save_to}/badges.png" # output location for generated image
91
+ dflt[:output_style] = "#{save_to}/badges.css" # output location for generated stylesheet
89
92
 
90
93
  @options = dflt.merge options
91
94
  end
@@ -1,3 +1,3 @@
1
1
  class Colos
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -4,7 +4,7 @@ describe Coderbits::Glue do
4
4
 
5
5
  describe ".new" do
6
6
  before do
7
- @glue = Coderbits::Glue.new 'artemeff'
7
+ @glue = Coderbits::Glue.new 'artemeff', save_to: './temp/'
8
8
  end
9
9
 
10
10
  it "should have username" do
@@ -13,8 +13,16 @@ describe Coderbits::Glue do
13
13
  end
14
14
 
15
15
  describe ".run!" do
16
- it "..." do
17
- pending "Write tests"
16
+ after do
17
+ FileUtils.rm_rf './temp/'
18
+ end
19
+
20
+ it "should run without errors" do
21
+ Coderbits.glue('artemeff', save_to: './temp/').run!
22
+ end
23
+
24
+ it "should run without errors with custom badge size" do
25
+ Coderbits.glue('artemeff', badge_size: 32, save_to: './temp/').run!
18
26
  end
19
27
  end
20
28
 
@@ -4,5 +4,6 @@ $LOAD_PATH.unshift(File.dirname(__FILE__))
4
4
  require 'rspec'
5
5
  require 'coderbits'
6
6
  require 'coveralls'
7
+ require 'fileutils'
7
8
 
8
9
  Coveralls.wear!
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coderbits
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuri Artemev