Skip to content

Commit 860d6d6

Browse files
authored
Merge pull request #13 from jamesjefferies/update-for-rails-5.1
Update for Rails 5.1 compatibility
2 parents 1640df6 + 6693f8f commit 860d6d6

4 files changed

Lines changed: 116 additions & 104 deletions

File tree

Gemfile.lock

Lines changed: 102 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -3,163 +3,165 @@ PATH
33
specs:
44
pinfirmable (0.1.5)
55
devise (~> 4.0)
6-
rails (~> 5.0.0, >= 5.0.0.1)
6+
rails (>= 5.0.6, < 5.2)
77

88
GEM
99
remote: https://rubygems.org/
1010
specs:
11-
actioncable (5.0.0.1)
12-
actionpack (= 5.0.0.1)
13-
nio4r (~> 1.2)
11+
actioncable (5.1.4)
12+
actionpack (= 5.1.4)
13+
nio4r (~> 2.0)
1414
websocket-driver (~> 0.6.1)
15-
actionmailer (5.0.0.1)
16-
actionpack (= 5.0.0.1)
17-
actionview (= 5.0.0.1)
18-
activejob (= 5.0.0.1)
15+
actionmailer (5.1.4)
16+
actionpack (= 5.1.4)
17+
actionview (= 5.1.4)
18+
activejob (= 5.1.4)
1919
mail (~> 2.5, >= 2.5.4)
2020
rails-dom-testing (~> 2.0)
21-
actionpack (5.0.0.1)
22-
actionview (= 5.0.0.1)
23-
activesupport (= 5.0.0.1)
21+
actionpack (5.1.4)
22+
actionview (= 5.1.4)
23+
activesupport (= 5.1.4)
2424
rack (~> 2.0)
25-
rack-test (~> 0.6.3)
25+
rack-test (>= 0.6.3)
2626
rails-dom-testing (~> 2.0)
2727
rails-html-sanitizer (~> 1.0, >= 1.0.2)
28-
actionview (5.0.0.1)
29-
activesupport (= 5.0.0.1)
28+
actionview (5.1.4)
29+
activesupport (= 5.1.4)
3030
builder (~> 3.1)
31-
erubis (~> 2.7.0)
31+
erubi (~> 1.4)
3232
rails-dom-testing (~> 2.0)
33-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
34-
activejob (5.0.0.1)
35-
activesupport (= 5.0.0.1)
33+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
34+
activejob (5.1.4)
35+
activesupport (= 5.1.4)
3636
globalid (>= 0.3.6)
37-
activemodel (5.0.0.1)
38-
activesupport (= 5.0.0.1)
39-
activerecord (5.0.0.1)
40-
activemodel (= 5.0.0.1)
41-
activesupport (= 5.0.0.1)
42-
arel (~> 7.0)
43-
activesupport (5.0.0.1)
37+
activemodel (5.1.4)
38+
activesupport (= 5.1.4)
39+
activerecord (5.1.4)
40+
activemodel (= 5.1.4)
41+
activesupport (= 5.1.4)
42+
arel (~> 8.0)
43+
activesupport (5.1.4)
4444
concurrent-ruby (~> 1.0, >= 1.0.2)
4545
i18n (~> 0.7)
4646
minitest (~> 5.1)
4747
tzinfo (~> 1.1)
48-
addressable (2.4.0)
49-
arel (7.1.4)
48+
addressable (2.5.2)
49+
public_suffix (>= 2.0.2, < 4.0)
50+
arel (8.0.0)
5051
bcrypt (3.1.11)
51-
builder (3.2.2)
52-
capybara (2.8.1)
52+
builder (3.2.3)
53+
capybara (2.16.1)
5354
addressable
54-
mime-types (>= 1.16)
55+
mini_mime (>= 0.1.3)
5556
nokogiri (>= 1.3.3)
5657
rack (>= 1.0.0)
5758
rack-test (>= 0.5.4)
5859
xpath (~> 2.0)
59-
concurrent-ruby (1.0.2)
60-
devise (4.2.0)
60+
concurrent-ruby (1.0.5)
61+
crass (1.0.3)
62+
devise (4.3.0)
6163
bcrypt (~> 3.0)
6264
orm_adapter (~> 0.1)
63-
railties (>= 4.1.0, < 5.1)
65+
railties (>= 4.1.0, < 5.2)
6466
responders
6567
warden (~> 1.2.3)
66-
diff-lcs (1.2.5)
67-
erubis (2.7.0)
68-
globalid (0.3.7)
69-
activesupport (>= 4.1.0)
70-
i18n (0.7.0)
71-
loofah (2.0.3)
68+
diff-lcs (1.3)
69+
erubi (1.7.0)
70+
globalid (0.4.1)
71+
activesupport (>= 4.2.0)
72+
i18n (0.9.1)
73+
concurrent-ruby (~> 1.0)
74+
loofah (2.1.1)
75+
crass (~> 1.0.2)
7276
nokogiri (>= 1.5.9)
73-
mail (2.6.4)
74-
mime-types (>= 1.16, < 4)
75-
method_source (0.8.2)
76-
mime-types (3.1)
77-
mime-types-data (~> 3.2015)
78-
mime-types-data (3.2016.0521)
79-
mini_portile2 (2.1.0)
80-
minitest (5.9.0)
81-
nio4r (1.2.1)
82-
nokogiri (1.6.8)
83-
mini_portile2 (~> 2.1.0)
84-
pkg-config (~> 1.1.7)
77+
mail (2.7.0)
78+
mini_mime (>= 0.1.1)
79+
method_source (0.9.0)
80+
mini_mime (1.0.0)
81+
mini_portile2 (2.3.0)
82+
minitest (5.10.3)
83+
nio4r (2.1.0)
84+
nokogiri (1.8.1)
85+
mini_portile2 (~> 2.3.0)
8586
orm_adapter (0.5.0)
86-
pkg-config (1.1.7)
87-
rack (2.0.1)
88-
rack-test (0.6.3)
89-
rack (>= 1.0)
90-
rails (5.0.0.1)
91-
actioncable (= 5.0.0.1)
92-
actionmailer (= 5.0.0.1)
93-
actionpack (= 5.0.0.1)
94-
actionview (= 5.0.0.1)
95-
activejob (= 5.0.0.1)
96-
activemodel (= 5.0.0.1)
97-
activerecord (= 5.0.0.1)
98-
activesupport (= 5.0.0.1)
99-
bundler (>= 1.3.0, < 2.0)
100-
railties (= 5.0.0.1)
87+
public_suffix (3.0.1)
88+
rack (2.0.3)
89+
rack-test (0.8.2)
90+
rack (>= 1.0, < 3)
91+
rails (5.1.4)
92+
actioncable (= 5.1.4)
93+
actionmailer (= 5.1.4)
94+
actionpack (= 5.1.4)
95+
actionview (= 5.1.4)
96+
activejob (= 5.1.4)
97+
activemodel (= 5.1.4)
98+
activerecord (= 5.1.4)
99+
activesupport (= 5.1.4)
100+
bundler (>= 1.3.0)
101+
railties (= 5.1.4)
101102
sprockets-rails (>= 2.0.0)
102-
rails-dom-testing (2.0.1)
103-
activesupport (>= 4.2.0, < 6.0)
104-
nokogiri (~> 1.6.0)
103+
rails-dom-testing (2.0.3)
104+
activesupport (>= 4.2.0)
105+
nokogiri (>= 1.6)
105106
rails-html-sanitizer (1.0.3)
106107
loofah (~> 2.0)
107-
railties (5.0.0.1)
108-
actionpack (= 5.0.0.1)
109-
activesupport (= 5.0.0.1)
108+
railties (5.1.4)
109+
actionpack (= 5.1.4)
110+
activesupport (= 5.1.4)
110111
method_source
111112
rake (>= 0.8.7)
112113
thor (>= 0.18.1, < 2.0)
113-
rake (11.2.2)
114-
responders (2.3.0)
115-
railties (>= 4.2.0, < 5.1)
116-
rspec-core (3.5.2)
117-
rspec-support (~> 3.5.0)
118-
rspec-expectations (3.5.0)
114+
rake (12.3.0)
115+
responders (2.4.0)
116+
actionpack (>= 4.2.0, < 5.3)
117+
railties (>= 4.2.0, < 5.3)
118+
rspec-core (3.7.0)
119+
rspec-support (~> 3.7.0)
120+
rspec-expectations (3.7.0)
119121
diff-lcs (>= 1.2.0, < 2.0)
120-
rspec-support (~> 3.5.0)
121-
rspec-mocks (3.5.0)
122+
rspec-support (~> 3.7.0)
123+
rspec-mocks (3.7.0)
122124
diff-lcs (>= 1.2.0, < 2.0)
123-
rspec-support (~> 3.5.0)
124-
rspec-rails (3.5.1)
125+
rspec-support (~> 3.7.0)
126+
rspec-rails (3.7.2)
125127
actionpack (>= 3.0)
126128
activesupport (>= 3.0)
127129
railties (>= 3.0)
128-
rspec-core (~> 3.5.0)
129-
rspec-expectations (~> 3.5.0)
130-
rspec-mocks (~> 3.5.0)
131-
rspec-support (~> 3.5.0)
132-
rspec-support (3.5.0)
130+
rspec-core (~> 3.7.0)
131+
rspec-expectations (~> 3.7.0)
132+
rspec-mocks (~> 3.7.0)
133+
rspec-support (~> 3.7.0)
134+
rspec-support (3.7.0)
133135
sprockets (3.7.1)
134136
concurrent-ruby (~> 1.0)
135137
rack (> 1, < 3)
136-
sprockets-rails (3.2.0)
138+
sprockets-rails (3.2.1)
137139
actionpack (>= 4.0)
138140
activesupport (>= 4.0)
139141
sprockets (>= 3.0.0)
140-
sqlite3 (1.3.11)
141-
thor (0.19.1)
142-
thread_safe (0.3.5)
143-
timecop (0.8.1)
144-
tzinfo (1.2.2)
142+
sqlite3 (1.3.13)
143+
thor (0.20.0)
144+
thread_safe (0.3.6)
145+
timecop (0.9.1)
146+
tzinfo (1.2.4)
145147
thread_safe (~> 0.1)
146-
warden (1.2.6)
148+
warden (1.2.7)
147149
rack (>= 1.0)
148-
websocket-driver (0.6.4)
150+
websocket-driver (0.6.5)
149151
websocket-extensions (>= 0.1.0)
150-
websocket-extensions (0.1.2)
151-
xpath (2.0.0)
152+
websocket-extensions (0.1.3)
153+
xpath (2.1.0)
152154
nokogiri (~> 1.3)
153155

154156
PLATFORMS
155157
ruby
156158

157159
DEPENDENCIES
158-
capybara (~> 2.8.0)
160+
capybara (~> 2.16.1)
159161
pinfirmable!
160-
rspec-rails
162+
rspec-rails (~> 3.7)
161163
sqlite3
162164
timecop
163165

164166
BUNDLED WITH
165-
1.13.6
167+
1.15.2

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@ To skip the pinfirmable email when creating a user (e.g. when seeding a database
4040
user.save
4141
```
4242

43+
## Development set up
44+
45+
Check out the project and then run
46+
```bash
47+
rake db:setup
48+
```
49+
To create and migrate a development and test database.
50+
51+
Run ```rspec``` to run the tests.
52+
4353
## Todo
4454
- Encrypt the pin in the DB
4555

lib/pinfirmable/models/pinfirmable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module Pinfirmable
44
extend ActiveSupport::Concern
55

66
included do
7-
before_create :generate_confirmation_token, unless: "skip_pinfirmation?"
7+
before_create :generate_confirmation_token, unless: :skip_pinfirmation?
88
after_commit :send_confirmation_instructions, on: :create
99
end
1010

pinfirmable.gemspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ Gem::Specification.new do |s|
1818
s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md"]
1919
s.test_files = Dir["spec/**/*"]
2020

21-
s.add_dependency "rails", "~> 5.0.0", ">= 5.0.0.1"
21+
s.add_dependency "rails", ">= 5.0.6", "< 5.2"
2222
s.add_dependency "devise", "~> 4.0"
2323

2424
s.add_development_dependency "sqlite3"
25-
s.add_development_dependency "rspec-rails"
26-
s.add_development_dependency "capybara", "~>2.8.0"
25+
s.add_development_dependency "rspec-rails", "~>3.7"
26+
s.add_development_dependency "capybara", "~>2.16.1"
2727
s.add_development_dependency "timecop"
2828
end

0 commit comments

Comments
 (0)