button_helper 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/{LICENSE → LICENSE.txt} +2 -2
- data/README.md +5 -17
- data/Rakefile +0 -1
- data/button_helper.gemspec +21 -18
- data/lib/button_helper/version.rb +1 -1
- data/lib/button_helper.rb +7 -7
- data/{spec → lib/spec}/button_helper_spec.rb +5 -5
- metadata +71 -63
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MTI3ZjhhMTFkYTU0OWU1NDgyODg2NjE2YTJmYjQ2NTdiYjNhYzZkNQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
Y2NjMjEzYzFiZDk1NWUxZTVjNjU4ZTJlM2JmYzg4OGRmZWQ4MTA4ZA==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MjUyYmRkZjViMWI0OGM2Mjc2NTE4ZjEyNDRjYmZkYzQ2NDQ3NzFhODQzNTk5
|
10
|
+
YWQ2MWMxMmI2YjE0ZWFiMzIxNjNkNGZlMzFmMjc4NmI3ODE0YjUxMjk2Y2Jh
|
11
|
+
M2JhZTYxODY5NWQyNTIxYzU3NGJiYTc4MjhiMWYwYzZhYzczZWI=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NTIzN2VlZmUzYmI4NDQ2OTk0YmY0NGVlOTQ3MTk5MTA2M2NiOWQ2NGI0N2Ji
|
14
|
+
NTI2MmE1OWY5OWJjYTY3ZjcyZjFlMTNiNTc2MGZhYmExYWIwZmNhOGEzYmJm
|
15
|
+
OTI5ZGVhZTY2YjQwZjFhNWU4MmI4YWM4YmQ3ZTllNzAyMTQ1MmU=
|
data/{LICENSE → LICENSE.txt}
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2014
|
1
|
+
Copyright (c) 2014 Nayana-Bhagat
|
2
2
|
|
3
3
|
MIT License
|
4
4
|
|
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
19
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
20
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
21
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# ButtonHelper
|
2
2
|
|
3
|
-
|
3
|
+
TODO: Write a gem description
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -16,26 +16,14 @@ Or install it yourself as:
|
|
16
16
|
|
17
17
|
$ gem install button_helper
|
18
18
|
|
19
|
-
##
|
19
|
+
## Usage
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
ButtonHelper::btn_class(status)
|
24
|
-
|
25
|
-
status here is in_progress/success/failed
|
26
|
-
|
27
|
-
Style your buttons using the sassy buttons.
|
28
|
-
|
29
|
-
## TODO
|
21
|
+
TODO: Write usage instructions here
|
30
22
|
|
31
|
-
Including sassy button CSS in the Gem.
|
32
|
-
|
33
23
|
## Contributing
|
34
24
|
|
35
|
-
1. Fork it
|
25
|
+
1. Fork it ( http://github.com/<my-github-username>/button_helper/fork )
|
36
26
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
37
|
-
3. Commit your changes (`git commit -am '
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
38
28
|
4. Push to the branch (`git push origin my-new-feature`)
|
39
29
|
5. Create new Pull Request
|
40
|
-
|
41
|
-
|
data/Rakefile
CHANGED
data/button_helper.gemspec
CHANGED
@@ -1,21 +1,24 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'button_helper/version'
|
3
5
|
|
4
|
-
Gem::Specification.new do |
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "button_helper"
|
8
|
+
spec.version = ButtonHelper::VERSION
|
9
|
+
spec.authors = ["Nayana-Bhagat" "Vaibhav Kohli" "Ankita Kanitkar"]
|
10
|
+
spec.email = ["Nayana_Bhagat@external.mckinsey.com"]
|
11
|
+
spec.summary = %q{Helper method to give cuztomised button class}
|
12
|
+
spec.description = %q{Helper method to give cuztomised button class}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
12
15
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
gem.require_paths = ["lib"]
|
18
|
-
gem.version = ButtonHelper::VERSION
|
19
|
-
end
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.5"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
spec.add_development_dependency "rspec"
|
24
|
+
end
|
data/lib/button_helper.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
require "button_helper/version"
|
2
2
|
|
3
3
|
module ButtonHelper
|
4
|
-
|
5
|
-
if status=="
|
6
|
-
'button
|
7
|
-
elsif status=="success"
|
8
|
-
'button
|
9
|
-
elsif status=="
|
10
|
-
'button
|
4
|
+
def self.btn_class(status)
|
5
|
+
if status == "progress"
|
6
|
+
'button progress'
|
7
|
+
elsif status == "success"
|
8
|
+
'button success'
|
9
|
+
elsif status == "failure"
|
10
|
+
'button failure'
|
11
11
|
else
|
12
12
|
''
|
13
13
|
end
|
@@ -3,16 +3,16 @@ require 'button_helper'
|
|
3
3
|
describe ButtonHelper do
|
4
4
|
|
5
5
|
it 'should return in progress css when the status is In progress' do
|
6
|
-
css1 = ButtonHelper.btn_class('
|
7
|
-
css1.should == 'button
|
6
|
+
css1 = ButtonHelper.btn_class('progress')
|
7
|
+
css1.should == 'button progress'
|
8
8
|
end
|
9
9
|
it 'should return success css when the status is success' do
|
10
10
|
css1 = ButtonHelper.btn_class('success')
|
11
|
-
css1.should == 'button
|
11
|
+
css1.should == 'button success'
|
12
12
|
end
|
13
13
|
it 'should return failure css when the status is failed' do
|
14
|
-
css1 = ButtonHelper.btn_class('
|
15
|
-
css1.should == 'button
|
14
|
+
css1 = ButtonHelper.btn_class('failure')
|
15
|
+
css1.should == 'button failure'
|
16
16
|
end
|
17
17
|
it 'should not return anything if status is nil' do
|
18
18
|
css1 = ButtonHelper.btn_class(nil)
|
metadata
CHANGED
@@ -1,87 +1,95 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: button_helper
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 3
|
10
|
-
version: 0.0.3
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.4
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
13
|
-
- Nayana
|
6
|
+
authors:
|
7
|
+
- Nayana-BhagatVaibhav KohliAnkita Kanitkar
|
14
8
|
autorequire:
|
15
9
|
bindir: bin
|
16
10
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
11
|
+
date: 2014-02-21 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.5'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.5'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
22
35
|
prerelease: false
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
32
48
|
type: :development
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
-
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Helper method to give cuztomised button class
|
56
|
+
email:
|
57
|
+
- Nayana_Bhagat@external.mckinsey.com
|
37
58
|
executables: []
|
38
|
-
|
39
59
|
extensions: []
|
40
|
-
|
41
60
|
extra_rdoc_files: []
|
42
|
-
|
43
|
-
files:
|
61
|
+
files:
|
44
62
|
- .gitignore
|
45
63
|
- Gemfile
|
46
|
-
- LICENSE
|
64
|
+
- LICENSE.txt
|
47
65
|
- README.md
|
48
66
|
- Rakefile
|
49
67
|
- button_helper.gemspec
|
50
68
|
- lib/button_helper.rb
|
51
69
|
- lib/button_helper/version.rb
|
52
|
-
- spec/button_helper_spec.rb
|
53
|
-
homepage:
|
54
|
-
licenses:
|
55
|
-
|
70
|
+
- lib/spec/button_helper_spec.rb
|
71
|
+
homepage: ''
|
72
|
+
licenses:
|
73
|
+
- MIT
|
74
|
+
metadata: {}
|
56
75
|
post_install_message:
|
57
76
|
rdoc_options: []
|
58
|
-
|
59
|
-
require_paths:
|
77
|
+
require_paths:
|
60
78
|
- lib
|
61
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
none: false
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
hash: 3
|
76
|
-
segments:
|
77
|
-
- 0
|
78
|
-
version: "0"
|
79
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ! '>='
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ! '>='
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
79
89
|
requirements: []
|
80
|
-
|
81
90
|
rubyforge_project:
|
82
|
-
rubygems_version:
|
91
|
+
rubygems_version: 2.2.1
|
83
92
|
signing_key:
|
84
|
-
specification_version:
|
85
|
-
summary:
|
93
|
+
specification_version: 4
|
94
|
+
summary: Helper method to give cuztomised button class
|
86
95
|
test_files: []
|
87
|
-
|