pwpush 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +20 -0
  3. data/Capfile +8 -0
  4. data/Gemfile +51 -0
  5. data/Gemfile.lock +224 -0
  6. data/LICENSE.txt +674 -0
  7. data/Procfile +3 -0
  8. data/README.md +91 -0
  9. data/Rakefile +8 -0
  10. data/TODO +21 -0
  11. data/app.json +21 -0
  12. data/app/assets/flash/clippy.swf +0 -0
  13. data/app/assets/flash/github-clippy.swf +0 -0
  14. data/app/assets/images/apple-touch-icon-ipad.png +0 -0
  15. data/app/assets/images/apple-touch-icon-ipad3.png +0 -0
  16. data/app/assets/images/apple-touch-icon-iphone.png +0 -0
  17. data/app/assets/images/apple-touch-icon-iphone4.png +0 -0
  18. data/app/assets/images/black_wood.jpg +0 -0
  19. data/app/assets/images/broken_noise.png +0 -0
  20. data/app/assets/images/button_down.png +0 -0
  21. data/app/assets/images/button_over.png +0 -0
  22. data/app/assets/images/button_up.png +0 -0
  23. data/app/assets/images/concrete_wall_3.png +0 -0
  24. data/app/assets/images/favicon.ico +0 -0
  25. data/app/assets/images/forkme.png +0 -0
  26. data/app/assets/images/outlets.png +0 -0
  27. data/app/assets/images/pwpush_favicon.jpg +0 -0
  28. data/app/assets/images/pwpush_logo.png +0 -0
  29. data/app/assets/images/rails.png +0 -0
  30. data/app/assets/javascripts/api.js.coffee +4 -0
  31. data/app/assets/javascripts/application.js +52 -0
  32. data/app/assets/javascripts/errors.js.coffee +3 -0
  33. data/app/assets/javascripts/fd-slider.js +1299 -0
  34. data/app/assets/javascripts/jquery-cookie.js +117 -0
  35. data/app/assets/javascripts/jquery.noty.js +520 -0
  36. data/app/assets/javascripts/layouts/top.js +34 -0
  37. data/app/assets/javascripts/passwords.js +62 -0
  38. data/app/assets/javascripts/spoiler.js +101 -0
  39. data/app/assets/javascripts/themes/default.js +156 -0
  40. data/app/assets/stylesheets/api.css.scss +3 -0
  41. data/app/assets/stylesheets/application.css +7 -0
  42. data/app/assets/stylesheets/errors.css.scss +3 -0
  43. data/app/assets/stylesheets/fd-slider.css +650 -0
  44. data/app/assets/stylesheets/global.css.scss +52 -0
  45. data/app/assets/stylesheets/passwords.css.scss +114 -0
  46. data/app/assets/stylesheets/users.css.scss +11 -0
  47. data/app/controllers/api_controller.rb +30 -0
  48. data/app/controllers/application_controller.rb +23 -0
  49. data/app/controllers/errors_controller.rb +7 -0
  50. data/app/controllers/passwords_controller.rb +153 -0
  51. data/app/controllers/users/omniauth_callbacks_controller.rb +71 -0
  52. data/app/controllers/views_controller.rb +11 -0
  53. data/app/helpers/api_helper.rb +2 -0
  54. data/app/helpers/application_helper.rb +31 -0
  55. data/app/helpers/errors_helper.rb +2 -0
  56. data/app/helpers/passwords_helper.rb +2 -0
  57. data/app/helpers/views_helper.rb +2 -0
  58. data/app/mailers/.gitkeep +0 -0
  59. data/app/models/.gitkeep +0 -0
  60. data/app/models/password.rb +51 -0
  61. data/app/models/user.rb +20 -0
  62. data/app/models/view.rb +4 -0
  63. data/app/views/api/config.html.haml +2 -0
  64. data/app/views/api/create.html.haml +2 -0
  65. data/app/views/api/generate.html.haml +2 -0
  66. data/app/views/api/list.html.haml +2 -0
  67. data/app/views/devise/confirmations/new.html.erb +12 -0
  68. data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  69. data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  70. data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
  71. data/app/views/devise/passwords/edit.html.erb +16 -0
  72. data/app/views/devise/passwords/new.html.erb +12 -0
  73. data/app/views/devise/registrations/edit.html.erb +25 -0
  74. data/app/views/devise/registrations/new.html.haml +50 -0
  75. data/app/views/devise/sessions/new.html.haml +51 -0
  76. data/app/views/devise/shared/_links.erb +25 -0
  77. data/app/views/devise/unlocks/new.html.erb +12 -0
  78. data/app/views/errors/error_404.html.haml +21 -0
  79. data/app/views/errors/error_500.html.haml +21 -0
  80. data/app/views/layouts/_ga.html.erb +14 -0
  81. data/app/views/layouts/application.html.haml +41 -0
  82. data/app/views/pages/about.html.haml +159 -0
  83. data/app/views/passwords/edit.html.haml +7 -0
  84. data/app/views/passwords/index.html.haml +17 -0
  85. data/app/views/passwords/new.html.haml +68 -0
  86. data/app/views/passwords/show.html.haml +58 -0
  87. data/app/views/shared/_auth_providers.html.haml +9 -0
  88. data/app/views/shared/_messages.html.haml +4 -0
  89. data/app/views/views/_form.html.erb +16 -0
  90. data/app/views/views/edit.html.erb +8 -0
  91. data/app/views/views/index.html.erb +21 -0
  92. data/app/views/views/new.html.erb +5 -0
  93. data/app/views/views/show.html.erb +20 -0
  94. data/bin/bundle +13 -0
  95. data/config.ru +4 -0
  96. data/config/application.rb +51 -0
  97. data/config/boot.rb +6 -0
  98. data/config/capistrano_database_yml.rb +158 -0
  99. data/config/database.yml +19 -0
  100. data/config/deploy.rb +140 -0
  101. data/config/deploy/database.yml.erb +52 -0
  102. data/config/deploy/local_cap_config.rb.example +54 -0
  103. data/config/environment.rb +42 -0
  104. data/config/environments/development.rb +30 -0
  105. data/config/environments/engineyard.rb +60 -0
  106. data/config/environments/private.rb +60 -0
  107. data/config/environments/production.rb +60 -0
  108. data/config/environments/test.rb +39 -0
  109. data/config/initializers/backtrace_silencers.rb +7 -0
  110. data/config/initializers/devise.rb +211 -0
  111. data/config/initializers/inflections.rb +10 -0
  112. data/config/initializers/mime_types.rb +5 -0
  113. data/config/initializers/secret_token.rb +7 -0
  114. data/config/initializers/session_store.rb +8 -0
  115. data/config/initializers/wrap_parameters.rb +14 -0
  116. data/config/locales/devise.en.yml +58 -0
  117. data/config/locales/en.yml +5 -0
  118. data/config/routes.rb +16 -0
  119. data/config/unicorn.rb +22 -0
  120. data/db/migrate/20111128183630_create_passwords.rb +12 -0
  121. data/db/migrate/20111228183300_create_views.rb +16 -0
  122. data/db/migrate/20120102210558_devise_create_users.rb +54 -0
  123. data/db/migrate/20120102210559_create_rails_admin_histories_table.rb +18 -0
  124. data/db/migrate/20120102220933_add_admin_to_user.rb +9 -0
  125. data/db/migrate/20120129211750_add_lockable_to_users.rb +10 -0
  126. data/db/migrate/20120220172426_add_user_to_password.rb +11 -0
  127. data/db/migrate/20121105144421_add_deleted_to_password.rb +5 -0
  128. data/db/migrate/20150323145847_add_first_view_flag.rb +9 -0
  129. data/db/migrate/20160214205926_add_deletable_to_password.rb +5 -0
  130. data/db/schema.rb +78 -0
  131. data/db/seeds.rb +7 -0
  132. data/log/.gitkeep +0 -0
  133. data/public/404.html +26 -0
  134. data/public/422.html +26 -0
  135. data/public/500.html +26 -0
  136. data/public/favicon.ico +0 -0
  137. data/public/robots.txt +3 -0
  138. data/script/rails +6 -0
  139. metadata +226 -0
@@ -0,0 +1,14 @@
1
+ <script type="text/javascript">
2
+
3
+ var _gaq = _gaq || [];
4
+ _gaq.push(['_setAccount', 'UA-28303744-1']);
5
+ _gaq.push(['_setDomainName', 'pwpush.com']);
6
+ _gaq.push(['_trackPageview']);
7
+
8
+ (function() {
9
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
10
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
11
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
12
+ })();
13
+
14
+ </script>
@@ -0,0 +1,41 @@
1
+ !!!
2
+ %html
3
+ %head
4
+ %title PasswordPusher
5
+ = csrf_meta_tags
6
+ = oboe_rum_header rescue ""
7
+ = stylesheet_link_tag "application"
8
+ %link{ :rel => "shortcut icon", :href => asset_path("favicon.ico"), :type => "image/x-icon" }
9
+ %link{ :rel => "apple-touch-icon", :href => asset_path("apple-touch-icon-iphone.png") }
10
+ %link{ :rel => "apple-touch-icon", :sizes => "72x72", :href => asset_path("apple-touch-icon-ipad.png") }
11
+ %link{ :rel => "apple-touch-icon", :sizes => "114x114", :href => asset_path("apple-touch-icon-iphone4.png") }
12
+ %link{ :rel => "apple-touch-icon", :sizes => "144x144", :href => asset_path("apple-touch-icon-ipad3.png") }
13
+ :javascript
14
+ // Set up the yepnope (Modernizr.load) directives...
15
+ Modernizr.load([
16
+ {
17
+ // Test if Input Range is supported using Modernizr
18
+ test: Modernizr.inputtypes.range,
19
+ // If ranges are not supported, load the slider script and CSS file
20
+ nope: [
21
+ // The slider CSS file
22
+ "css!#{asset_path('fd-slider.css')}"
23
+ // Javascript file for slider
24
+ ,"#{asset_path('fd-slider.js')}"
25
+ ],
26
+ callback: function(id, testResult) {
27
+ // If the slider file has loaded then fire the onDomReady event
28
+ if("fdSlider" in window && typeof (fdSlider.onDomReady) != "undefined") {
29
+ try { fdSlider.onDomReady(); } catch(err) {};
30
+ };
31
+ }
32
+ }
33
+ ]);
34
+ %body
35
+ .content
36
+ = link_to image_tag("forkme.png", :style => "position: absolute; top: 0; right: 0; border: 0; z-index: 1;", :alt => "Fork me on Github" ), "https://github.com/pglombardo/PasswordPusher"
37
+ = yield
38
+
39
+ = javascript_include_tag "application"
40
+ = render :partial => "layouts/ga" if Rails.env == "production"
41
+ = oboe_rum_footer rescue ""
@@ -0,0 +1,159 @@
1
+
2
+ .about_content
3
+ %div{ :style => 'float: left; font-size: .8em; margin-bottom: 50px;' }
4
+ = link_to '[ Back to front page ]', root_path
5
+
6
+ %p{ :style => 'clear: both;' }
7
+ %h1 About PasswordPusher
8
+
9
+ .about_content
10
+ %p
11
+ PasswordPusher is a Ruby application to communicate passwords over the web. Links to passwords expire after a certain number of views and/or time has passed. Hosted at
12
+ = succeed '.' do
13
+ = link_to "pwpush.com", "https://pwpush.com"
14
+
15
+ %p
16
+ I previously posted this project on
17
+ = link_to "Reddit", "http://www.reddit.com/r/sysadmin/comments/pfda0/do_you_email_out_passwords_i_wrote_this_utility/"
18
+ which provided some great feedback - most of which has been implemented.
19
+
20
+ %p
21
+ The source code to this site is
22
+ = succeed "." do
23
+ = link_to "on Github", "https://github.com/pglombardo/PasswordPusher"
24
+ It's opensource and free for anyone to use or modify. Use it internally at your organization, host it publicly or just use
25
+ = succeed "." do
26
+ = link_to "pwpush.com", "https://pwpush.com"
27
+ It's up to you.
28
+
29
+ %p
30
+ This is me (Peter Giacomo Lombardo) on
31
+ = link_to "LinkedIn", "http://it.linkedin.com/in/peterlombardo"
32
+ and
33
+ = succeed "." do
34
+ = link_to "Github", "https://github.com/pglombardo"
35
+
36
+ %p
37
+ For updates, you can
38
+ = succeed "," do
39
+ = link_to "follow me on Twitter", "https://twitter.com/pglombardo"
40
+ = link_to "Github", "https://github.com/pglombardo"
41
+ or on the
42
+ = succeed "." do
43
+ = link_to "Tumblr blog", "http://blog.gameface.in/"
44
+
45
+ %h1 Related
46
+
47
+ .about_content
48
+ %ul
49
+ %li
50
+ For
51
+ = link_to "Alfred app", "http://www.alfredapp.com/"
52
+ users on Mac, an
53
+ = link_to "workflow", "http://www.packal.org/workflow/passwordpusher"
54
+ to quickly push passwords.
55
+
56
+ %h1 Publicity
57
+
58
+ .about_content
59
+ %p
60
+ Random articles, comments and tweets about PasswordPusher...
61
+ %ol
62
+ %li
63
+ = link_to "How to share passwords securely", "http://envide.no/hvordan-dele-passord-pa-en-sikker-mate/"
64
+ (in Norwegian)
65
+ %li
66
+ = link_to "How to deploy PasswordPusher to CloudFoundry", "http://blog.cloudfoundry.gr.jp/2015/09/cf100apps-061-passwordpusher.html"
67
+ (in Japanese)
68
+ %li
69
+ PasswordPusher was included in
70
+ = link_to "Issue 23", "https://www.cronweekly.com/issue-23/"
71
+ of
72
+ = link_to "Cron Weekly", "https://www.cronweekly.com/"
73
+ %li
74
+ = succeed ":" do
75
+ = link_to "ThinkTechnica", "http://www.thinktechnica.com/"
76
+ = link_to "PasswordPusher", "http://www.thinktechnica.com/r/679/"
77
+
78
+ %li
79
+ = succeed ":" do
80
+ = link_to "TracceWeb", "http://www.tracceweb.com/"
81
+ (Italian)
82
+ = link_to "Invia Password o Messaggi in Modo Sicuro che si Autodistruggono: PasswordPusher", "http://www.tracceweb.com/5398/invia-password-o-messaggi-in-modo-sicuro-che-si-autodistruggono-passwordpusher"
83
+
84
+ %li
85
+ Mentions in a bunch of comments and Tweets: on
86
+ = succeed "," do
87
+ = link_to "HackerNews", "https://news.ycombinator.com/item?id=4237420"
88
+ = succeed "," do
89
+ = link_to "QandASystem", "http://www.qandasystem.info/security/best-practice-for-password-distribution/#comment-137020"
90
+ = succeed "," do
91
+ = link_to "WebDesignShock", "https://twitter.com/WebDesignShock/statuses/174198663701200897"
92
+ and
93
+ = link_to "Logicamp", "https://twitter.com/logicamp/statuses/224418623383535617"
94
+
95
+ %h1 Credits
96
+
97
+ .about_content
98
+ %p
99
+ Thanks to:
100
+
101
+ %ul
102
+ %li
103
+ Everyone on Reddit for all of
104
+ = link_to "the", "http://www.reddit.com/r/sysadmin/comments/pfda0/do_you_email_out_passwords_i_wrote_this_utility/"
105
+ = link_to "great", "http://www.reddit.com/r/web_design/comments/q841p/do_you_email_out_passwords_i_wrote_this_utility/"
106
+ = succeed '.' do
107
+ = link_to "feedback", "http://www.reddit.com/r/sysadmin/comments/tq39p/remember_passwordpusher_pwpushcom_its_now/"
108
+
109
+ %li
110
+ Reddit
111
+ = link_to "/r/freedesign", "http://www.reddit.com/r/freedesign"
112
+ artist
113
+ = link_to "JarvisAndPi", "http://www.reddit.com/user/JarvisAndPi"
114
+ for the favicons
115
+
116
+ %li
117
+ = link_to "zygat3r", "http://zygat3r.deviantart.com/"
118
+ for the
119
+ = link_to "Dark Wood Pack", "http://zygat3r.deviantart.com/art/Dark-Wood-58266349"
120
+ (page backgrounds).
121
+
122
+ %li
123
+ = link_to "Kasper", "https://github.com/kap0w"
124
+ for the
125
+ = succeed "." do
126
+ = link_to "JSON POST fix", "https://github.com/pglombardo/PasswordPusher/pull/3"
127
+
128
+ %h1 Other Related Projects
129
+
130
+ .about_content
131
+ %ul
132
+ %li= link_to "Agrippa", "http://getagrippa.com/"
133
+ %li
134
+ A Django spin-off project:
135
+ = link_to "projectgiraffe", "https://github.com/quasarj/projectgiraffe"
136
+
137
+ %li
138
+ = link_to "phanaster", "https://github.com/phanaster"
139
+ created a
140
+ = link_to "coupon pushing application", "https://github.com/phanaster/cpsh.me"
141
+ == (#{link_to "cpsh.me", "http://cpsh.me/"}) based off of PasswordPusher
142
+
143
+ %li
144
+ = link_to "bemosior", "https://github.com/bemosior"
145
+ put together a PHP port of PasswordPusher:
146
+ = link_to "PHPasswordPusher", "https://github.com/bemosior/PHPasswordPusher"
147
+
148
+
149
+ .about_content
150
+ %p
151
+ I also run
152
+ = succeed "." do
153
+ = link_to "Gameface", "http://gameface.in"
154
+ A site to showcase games, the people who play them and the characters they play.
155
+
156
+ .about_content
157
+ %div{ :style => 'float: left; font-size: .8em; margin-bottom: 50px;' }
158
+ = link_to '[ Back to front page ]', root_path
159
+
@@ -0,0 +1,7 @@
1
+ %h1 Editing password
2
+
3
+ = render 'form'
4
+
5
+ = link_to 'Show', @password
6
+ \|
7
+ = link_to 'Back', passwords_path
@@ -0,0 +1,17 @@
1
+ %h1 Listing passwords
2
+
3
+ %table
4
+ %tr
5
+ %th
6
+ %th
7
+ %th
8
+
9
+ - @passwords.each do |password|
10
+ %tr
11
+ %td= link_to 'Show', password
12
+ %td= link_to 'Edit', edit_password_path(password)
13
+ %td= link_to 'Destroy', password, :confirm => 'Are you sure?', :method => :delete
14
+
15
+ %br
16
+
17
+ = link_to 'New Password', new_password_path
@@ -0,0 +1,68 @@
1
+
2
+ = form_for @password do |f|
3
+ %p
4
+ %div.title
5
+ %span.title Password Pusher
6
+ %br
7
+ %span.tagline Go Ahead. Email Another Password.
8
+ %p.payload
9
+ = f.text_field(:payload, { :class => "password", :value => PAYLOAD_INITIAL_TEXT, :onfocus => "prepareTextField(this)", :onblur => "revertTextField(this)", :autocomplete => "off" })
10
+ %p
11
+ Delete password after:
12
+ %p.slider_box
13
+ = range_field_tag("password_expire_after_days", EXPIRE_AFTER_DAYS_DEFAULT, {:name => "password[expire_after_days]", :class => "slider", :min => EXPIRE_AFTER_DAYS_MIN, :max => EXPIRE_AFTER_DAYS_MAX, :step => "1", :onchange => "showDaysValue(this.value)"})
14
+ %span#daysrange
15
+ == #{EXPIRE_AFTER_DAYS_DEFAULT} Days
16
+ %p.slider_box
17
+ = range_field_tag("password_expire_after_views", EXPIRE_AFTER_VIEWS_DEFAULT, {:name => "password[expire_after_views]", :class => "slider", :min => EXPIRE_AFTER_VIEWS_MIN, :max => EXPIRE_AFTER_VIEWS_MAX, :step => "1", :onchange => "showViewsValue(this.value)"})
18
+ %span#viewsrange
19
+ == #{EXPIRE_AFTER_VIEWS_DEFAULT} Views
20
+ %br
21
+ %span.note
22
+ (whichever comes first)
23
+ - if DELETABLE_BY_VIEWER_PASSWORDS
24
+ %p.notes
25
+ = check_box_tag "password[deletable_by_viewer]", nil, DELETABLE_BY_VIEWER_DEFAULT
26
+ Allow viewers to optionally delete password before expiration
27
+
28
+ %p
29
+ = f.submit(:value => "Push it!")
30
+
31
+
32
+ %p.notes
33
+ %p
34
+ %span
35
+ #cookie-save.cookie-save
36
+ %a{ :onclick => "saveExpirations()", :href => "#" } Save
37
+ these settings as
38
+ %i default
39
+ in a browser cookie.
40
+ %span.tip
41
+ * Tip: Only enter the password into the box. Other identifying information can compromise security.
42
+ %p
43
+ %span.note
44
+ All passwords are encrypted prior to storage and are available to only those with the direct link.
45
+ %br/
46
+ %span.note
47
+ Once expired, encrypted passwords are unequivocally deleted from the database.
48
+
49
+ %p.notes
50
+ New
51
+ = link_to "workflow", "http://www.packal.org/workflow/passwordpusher"
52
+ for Alfred users. Thanks to
53
+ = link_to "@psteinweber", "https://github.com/pglombardo/PasswordPusher/issues/29"
54
+ for the idea.
55
+
56
+ - if Rails.env == "production" or Rails.env == "development"
57
+ %p.notes
58
+ = link_to "About PasswordPusher", page_path('about')
59
+ \|
60
+ = link_to "Images, Logos and Icons", 'https://github.com/pglombardo/PasswordPusher/tree/master/app/assets/images'
61
+ %br/
62
+ Follow me on:
63
+ = succeed "," do
64
+ = link_to "@Twitter", "https://twitter.com/pglombardo"
65
+ = link_to "@Github", "https://github.com/pglombardo"
66
+ &amp;
67
+ = link_to "@Tumblr", "http://blog.gameface.in/"
68
+
@@ -0,0 +1,58 @@
1
+ %div.content
2
+ - if @password.expired
3
+ %p
4
+ We apologize but...
5
+ %div.payload
6
+ This password has expired.
7
+ %p
8
+ - if @password.deleted
9
+ This password was manually deleted by one of its viewers.
10
+ - elsif @password.views_remaining == 0
11
+ == The password has hit its maximum view count: #{@password.expire_after_views}.
12
+ - elsif @password.days_remaining == 0
13
+ == The password has hit its maximum age: #{@password.expire_after_days} days.
14
+
15
+ - else
16
+ - if @first_view
17
+ .share_note
18
+ == This is your password. Use this link to share it:
19
+ %p.url
20
+ %input{ :value => "#{request.url}", :spellcheck => "false", :onfocus => '$(this).focus(); $(this).select();', :onclick => '$(this).select();' }
21
+ %span#clip_data{ :style => 'display: none;' }= request.url
22
+ %span#clippy{ :title => 'copy to clipboard' }
23
+ %span#clip_tip copy to clipboard
24
+ != clippy(request.url)
25
+ :javascript
26
+ $('#clippy').mousedown(function (e){
27
+ $('#clip_tip').text('copied!');
28
+ });
29
+ $('#clippy').mouseout(function (e){
30
+ $('#clip_tip').text('copy to clipboard');
31
+ });
32
+ %br/
33
+ %span.note
34
+ This note won't be shown again for this password...
35
+ %br/
36
+ Don't believe me? Go ahead. Hit reload...
37
+ %p
38
+ Your password is...
39
+
40
+ %div.payload.spoiler<
41
+ = @payload
42
+
43
+ %p
44
+ - if @password.views_remaining == 0
45
+ == This password will be deleted in #{pluralize(@password.days_remaining, 'day')} or #{@password.views_remaining} more views (this is the last view).
46
+ - else
47
+ == This password will be deleted in #{pluralize(@password.days_remaining, 'day')}
48
+ == or #{pluralize(@password.views_remaining, 'more view')}.
49
+ - if @password.deletable_by_viewer
50
+ %p{ :style => 'font-size: .85em;' }
51
+ = link_to "Nah. I've got it. Delete it now.", password_path, :id => @password.url_token, :method => :delete, :confirm => 'This will delete the password forever. Are you sure?'
52
+ %div.footer_note
53
+ This
54
+ - if @password.expired
55
+ (unfortunately expired)
56
+ password is brought to you by
57
+ = link_to "Password Pusher", "/"
58
+ and viewers like you.
@@ -0,0 +1,9 @@
1
+ / %a.auth_provider{:href => user_omniauth_authorize_path(:twitter)}
2
+ / = image_tag "https://s3.amazonaws.com/gameface/images/authbuttons/twitter_64.png", :size => "64x64", :alt => "Twitter"
3
+ / Twitter
4
+ %a.auth_provider{:href => user_omniauth_authorize_path(:google)}
5
+ = image_tag "https://s3.amazonaws.com/gameface/images/authbuttons/google_64.png", :size => "64x64", :alt => "Google"
6
+ Google
7
+ %a.auth_provider{:href => user_omniauth_authorize_path(:yahoo)}
8
+ = image_tag "https://s3.amazonaws.com/gameface/images/authbuttons/yahoo_64.png", :size => "64x64", :alt => "Yahoo"
9
+ Yahoo
@@ -0,0 +1,4 @@
1
+ - [:alert, :notice, :error, :success].each do |key|
2
+ - unless flash[key].blank?
3
+ %p{ :class => "flash #{key}" }= flash[key]
4
+
@@ -0,0 +1,16 @@
1
+ <%= form_for @view do |f| %>
2
+ <%= f.error_messages %>
3
+ <p>
4
+ <%= f.label :password_id %><br />
5
+ <%= f.number_field :password_id %>
6
+ </p>
7
+ <p>
8
+ <%= f.label :ip %><br />
9
+ <%= f.text_field :ip %>
10
+ </p>
11
+ <p>
12
+ <%= f.label :user_agent %><br />
13
+ <%= f.text_field :user_agent %>
14
+ </p>
15
+ <p><%= f.submit %></p>
16
+ <% end %>
@@ -0,0 +1,8 @@
1
+ <% title "Edit View" %>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <p>
6
+ <%= link_to "Show", @view %> |
7
+ <%= link_to "View All", views_path %>
8
+ </p>
@@ -0,0 +1,21 @@
1
+ <% title "Views" %>
2
+
3
+ <table>
4
+ <tr>
5
+ <th>Password</th>
6
+ <th>Ip</th>
7
+ <th>User Agent</th>
8
+ </tr>
9
+ <% for view in @views %>
10
+ <tr>
11
+ <td><%= view.password_id %></td>
12
+ <td><%= view.ip %></td>
13
+ <td><%= view.user_agent %></td>
14
+ <td><%= link_to "Show", view %></td>
15
+ <td><%= link_to "Edit", edit_view_path(view) %></td>
16
+ <td><%= link_to "Destroy", view, :confirm => 'Are you sure?', :method => :delete %></td>
17
+ </tr>
18
+ <% end %>
19
+ </table>
20
+
21
+ <p><%= link_to "New View", new_view_path %></p>
@@ -0,0 +1,5 @@
1
+ <% title "New View" %>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <p><%= link_to "Back to List", views_path %></p>
@@ -0,0 +1,20 @@
1
+ <% title "View" %>
2
+
3
+ <p>
4
+ <strong>Password:</strong>
5
+ <%= @view.password_id %>
6
+ </p>
7
+ <p>
8
+ <strong>Ip:</strong>
9
+ <%= @view.ip %>
10
+ </p>
11
+ <p>
12
+ <strong>User Agent:</strong>
13
+ <%= @view.user_agent %>
14
+ </p>
15
+
16
+ <p>
17
+ <%= link_to "Edit", edit_view_path(@view) %> |
18
+ <%= link_to "Destroy", @view, :confirm => 'Are you sure?', :method => :delete %> |
19
+ <%= link_to "View All", views_path %>
20
+ </p>