coderbits 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +0 -2
- data/lib/coderbits/glue.rb +9 -6
- data/lib/coderbits/version.rb +1 -1
- data/spec/coderbits/glue_spec.rb +11 -3
- data/spec/spec_helper.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4e0049c3c53f1a9a7d60e7641d687457f8b4e91
|
4
|
+
data.tar.gz: 8efd2cdbc2ceeb5407d24479d33159c69d0eae54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c84856626af07e1f24de4e5d6ab3cd8c987aa8fb584703b769362719d070b870634ced894f6dc45de946d1eb05fbc3f7fcca5477730798f0533358040b9d4681
|
7
|
+
data.tar.gz: ceb6e5e36152a0a0361c9dc2ccdd49ce0f725e654511b80adb18e74ba829a132e9421b1f40824f742b8889a67ce08ba56a13cf990e3c28ab7948483f54c3558c
|
data/CHANGELOG.md
CHANGED
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
|
data/lib/coderbits/glue.rb
CHANGED
@@ -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: '
|
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
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
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
|
data/lib/coderbits/version.rb
CHANGED
data/spec/coderbits/glue_spec.rb
CHANGED
@@ -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
|
-
|
17
|
-
|
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
|
|
data/spec/spec_helper.rb
CHANGED