dismissible_helpers 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
data/README.md
CHANGED
@@ -39,7 +39,7 @@ help text if it has not been dismissed by the user. The string passed to
|
|
39
39
|
the method will be processed by the I18n method `t`, so the content of
|
40
40
|
the help message should be stored in your localization file.
|
41
41
|
|
42
|
-
```
|
42
|
+
```erb
|
43
43
|
<h2>Sample Page</h2>
|
44
44
|
<%= render_dismissible_helper 'sample_page.help_text' %>
|
45
45
|
```
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module DismissibleHelpers::Controllers::DismissedHelpers
|
2
2
|
def create
|
3
|
-
if respond_to?(:
|
3
|
+
if respond_to?(:current_user) && current_user && current_user.respond_to?(:dismissed_helpers)
|
4
4
|
current_user.dismissed_helpers += [ params[:helper] ]
|
5
5
|
current_user.save!
|
6
6
|
else
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
data/spec/dummy/log/test.log
CHANGED
@@ -675,3 +675,83 @@ Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)
|
|
675
675
|
[1m[35m (0.2ms)[0m DELETE FROM sqlite_sequence where name = 'identities';
|
676
676
|
[1m[36m (1.1ms)[0m [1mDELETE FROM "users";[0m
|
677
677
|
[1m[35m (0.1ms)[0m DELETE FROM sqlite_sequence where name = 'users';
|
678
|
+
Connecting to database specified by database.yml
|
679
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
680
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
681
|
+
[1m[36mSQL (7.5ms)[0m [1mINSERT INTO "users" ("created_at", "dismissed_helpers", "email", "session_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", Fri, 04 Jan 2013 14:27:50 UTC +00:00], ["dismissed_helpers", nil], ["email", "test@example.com"], ["session_token", nil], ["updated_at", Fri, 04 Jan 2013 14:27:50 UTC +00:00]]
|
682
|
+
[1m[35mIdentities::Password Exists (0.4ms)[0m SELECT 1 AS one FROM "identities" WHERE "identities"."type" IN ('Identities::Password') AND LOWER("identities"."username") = LOWER('test@example.com') LIMIT 1
|
683
|
+
Binary data inserted for `string` type on column `token`
|
684
|
+
[1m[36mSQL (1.6ms)[0m [1mINSERT INTO "identities" ("account_id", "account_type", "created_at", "remember_token", "reset_token", "token", "type", "updated_at", "username") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["account_id", 1], ["account_type", "User"], ["created_at", Fri, 04 Jan 2013 14:27:50 UTC +00:00], ["remember_token", nil], ["reset_token", nil], ["token", "$2a$10$l1eVb3c9jspVpmtk5ucadOizLPgN8rqX447hAADWzD43ToSi70nHe"], ["type", "Identities::Password"], ["updated_at", Fri, 04 Jan 2013 14:27:50 UTC +00:00], ["username", "test@example.com"]]
|
685
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
686
|
+
Started GET "/sign_in" for 127.0.0.1 at 2013-01-04 09:27:52 -0500
|
687
|
+
Processing by SessionsController#new as HTML
|
688
|
+
Parameters: {"identity"=>:password}
|
689
|
+
Rendered /Users/dan/.rbenv/versions/1.9.3-p286/lib/ruby/gems/1.9.1/gems/easy_auth-password-0.0.6/app/views/sessions/new.html.erb within layouts/application (15.0ms)
|
690
|
+
Completed 200 OK in 64ms (Views: 62.9ms | ActiveRecord: 0.0ms)
|
691
|
+
Started GET "/assets/application.css" for 127.0.0.1 at 2013-01-04 09:27:52 -0500
|
692
|
+
Served asset /application.css - 200 OK (5ms)
|
693
|
+
Started GET "/assets/application.js" for 127.0.0.1 at 2013-01-04 09:27:52 -0500
|
694
|
+
Served asset /application.js - 200 OK (17ms)
|
695
|
+
Started POST "/sign_in" for 127.0.0.1 at 2013-01-04 09:27:52 -0500
|
696
|
+
Processing by SessionsController#create as HTML
|
697
|
+
Parameters: {"utf8"=>"✓", "identities_password"=>"[FILTERED]", "commit"=>"Submit", "identity"=>:password}
|
698
|
+
[1m[36mIdentities::Password Load (0.2ms)[0m [1mSELECT "identities".* FROM "identities" WHERE "identities"."type" IN ('Identities::Password') AND ("identities"."username" LIKE 'test@example.com') LIMIT 1[0m
|
699
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1
|
700
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "users" SET "session_token" = '$2a$10$bR0W6HUJHOKNqvUoTTkO0ODkHUP8rmtJL3BgccxTDfq1A68HNfnMi' WHERE "users"."id" = 1[0m
|
701
|
+
Redirected to http://127.0.0.1:3999/
|
702
|
+
Completed 302 Found in 185ms (ActiveRecord: 0.6ms)
|
703
|
+
Started GET "/" for 127.0.0.1 at 2013-01-04 09:27:52 -0500
|
704
|
+
Processing by LandingController#show as HTML
|
705
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."session_token" = '$2a$10$bR0W6HUJHOKNqvUoTTkO0ODkHUP8rmtJL3BgccxTDfq1A68HNfnMi' LIMIT 1
|
706
|
+
Rendered landing/show.html.erb within layouts/application (1.7ms)
|
707
|
+
Completed 200 OK in 4ms (Views: 3.6ms | ActiveRecord: 0.1ms)
|
708
|
+
Started POST "/dismissed_helpers" for 127.0.0.1 at 2013-01-04 09:27:52 -0500
|
709
|
+
Processing by DismissedHelpersController#create as JSON
|
710
|
+
Parameters: {"helper"=>"helper"}
|
711
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."session_token" = '$2a$10$bR0W6HUJHOKNqvUoTTkO0ODkHUP8rmtJL3BgccxTDfq1A68HNfnMi' LIMIT 1[0m
|
712
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
713
|
+
[1m[36mIdentities::Password Load (0.2ms)[0m [1mSELECT "identities".* FROM "identities" WHERE "identities"."type" IN ('Identities::Password') AND "identities"."account_id" = 1 LIMIT 1[0m
|
714
|
+
[1m[35mIdentities::Password Exists (0.1ms)[0m SELECT 1 AS one FROM "identities" WHERE "identities"."type" IN ('Identities::Password') AND (LOWER("identities"."username") = LOWER('test@example.com') AND "identities"."id" != 1) LIMIT 1
|
715
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "users" SET "dismissed_helpers" = '---
|
716
|
+
- helper
|
717
|
+
', "updated_at" = '2013-01-04 14:27:52.867747' WHERE "users"."id" = 1[0m
|
718
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
719
|
+
Completed 200 OK in 13ms (Views: 0.1ms | ActiveRecord: 0.5ms)
|
720
|
+
Started GET "/" for 127.0.0.1 at 2013-01-04 09:27:53 -0500
|
721
|
+
Processing by LandingController#show as HTML
|
722
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."session_token" = '$2a$10$bR0W6HUJHOKNqvUoTTkO0ODkHUP8rmtJL3BgccxTDfq1A68HNfnMi' LIMIT 1[0m
|
723
|
+
Rendered landing/show.html.erb within layouts/application (1.1ms)
|
724
|
+
Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.1ms)
|
725
|
+
Started GET "/sign_out" for 127.0.0.1 at 2013-01-04 09:27:53 -0500
|
726
|
+
Processing by SessionsController#destroy as HTML
|
727
|
+
Redirected to http://127.0.0.1:3999/
|
728
|
+
Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
|
729
|
+
Started GET "/" for 127.0.0.1 at 2013-01-04 09:27:53 -0500
|
730
|
+
Processing by LandingController#show as HTML
|
731
|
+
Rendered landing/show.html.erb within layouts/application (0.3ms)
|
732
|
+
Completed 200 OK in 1ms (Views: 1.3ms | ActiveRecord: 0.0ms)
|
733
|
+
[1m[35m (1.8ms)[0m rollback transaction
|
734
|
+
[1m[36m (0.8ms)[0m [1mDELETE FROM "identities";[0m
|
735
|
+
[1m[35m (0.1ms)[0m DELETE FROM sqlite_sequence where name = 'identities';
|
736
|
+
[1m[36m (0.6ms)[0m [1mDELETE FROM "users";[0m
|
737
|
+
[1m[35m (0.1ms)[0m DELETE FROM sqlite_sequence where name = 'users';
|
738
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
739
|
+
Started GET "/" for 127.0.0.1 at 2013-01-04 09:27:53 -0500
|
740
|
+
Processing by LandingController#show as HTML
|
741
|
+
Completed 200 OK in 1ms (Views: 1.3ms | ActiveRecord: 0.0ms)
|
742
|
+
Started POST "/dismissed_helpers" for 127.0.0.1 at 2013-01-04 09:27:53 -0500
|
743
|
+
Processing by DismissedHelpersController#create as JSON
|
744
|
+
Parameters: {"helper"=>"helper"}
|
745
|
+
Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
746
|
+
Started GET "/" for 127.0.0.1 at 2013-01-04 09:27:54 -0500
|
747
|
+
Processing by LandingController#show as HTML
|
748
|
+
Completed 200 OK in 1ms (Views: 1.2ms | ActiveRecord: 0.0ms)
|
749
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
750
|
+
[1m[36m (2.3ms)[0m [1mDELETE FROM "identities";[0m
|
751
|
+
[1m[35m (0.1ms)[0m DELETE FROM sqlite_sequence where name = 'identities';
|
752
|
+
[1m[36m (0.6ms)[0m [1mDELETE FROM "users";[0m
|
753
|
+
[1m[35m (0.1ms)[0m DELETE FROM sqlite_sequence where name = 'users';
|
754
|
+
[1m[36m (2.4ms)[0m [1mDELETE FROM "identities";[0m
|
755
|
+
[1m[35m (0.1ms)[0m DELETE FROM sqlite_sequence where name = 'identities';
|
756
|
+
[1m[36m (0.8ms)[0m [1mDELETE FROM "users";[0m
|
757
|
+
[1m[35m (0.1ms)[0m DELETE FROM sqlite_sequence where name = 'users';
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dismissible_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 3.2.
|
21
|
+
version: 3.2.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 3.2.
|
29
|
+
version: 3.2.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: sqlite3
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -278,7 +278,6 @@ files:
|
|
278
278
|
- spec/dummy/tmp/capybara/capybara-201212302021348367660995.html
|
279
279
|
- spec/dummy/tmp/capybara/capybara-201212302023384130211415.html
|
280
280
|
- spec/dummy/tmp/capybara/capybara-201212302103058314654716.html
|
281
|
-
- spec/dummy/tmp/pids/server.pid
|
282
281
|
- spec/requests/authenticated_spec.rb
|
283
282
|
- spec/requests/step_helpers/authentication.rb
|
284
283
|
- spec/requests/unauthenticated_spec.rb
|
@@ -298,7 +297,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
298
297
|
version: '0'
|
299
298
|
segments:
|
300
299
|
- 0
|
301
|
-
hash: -
|
300
|
+
hash: -1949885104442183790
|
302
301
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
303
302
|
none: false
|
304
303
|
requirements:
|
@@ -307,7 +306,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
307
306
|
version: '0'
|
308
307
|
segments:
|
309
308
|
- 0
|
310
|
-
hash: -
|
309
|
+
hash: -1949885104442183790
|
311
310
|
requirements: []
|
312
311
|
rubyforge_project:
|
313
312
|
rubygems_version: 1.8.23
|
@@ -385,7 +384,6 @@ test_files:
|
|
385
384
|
- spec/dummy/tmp/capybara/capybara-201212302021348367660995.html
|
386
385
|
- spec/dummy/tmp/capybara/capybara-201212302023384130211415.html
|
387
386
|
- spec/dummy/tmp/capybara/capybara-201212302103058314654716.html
|
388
|
-
- spec/dummy/tmp/pids/server.pid
|
389
387
|
- spec/requests/authenticated_spec.rb
|
390
388
|
- spec/requests/step_helpers/authentication.rb
|
391
389
|
- spec/requests/unauthenticated_spec.rb
|
@@ -1 +0,0 @@
|
|
1
|
-
6346
|