echo_base 0.0.1 → 0.0.2
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.
- data/.document +5 -0
- data/.gitignore +21 -3
- data/LICENSE +20 -0
- data/README.rdoc +17 -0
- data/Rakefile +51 -2
- data/VERSION +1 -0
- data/echo_base.gemspec +165 -15
- data/lib/echo_base.rb +0 -3
- data/lib/generators/echo_base/USAGE +5 -0
- data/lib/generators/echo_base/echo_base_generator.rb +44 -0
- data/lib/generators/echo_base/templates/.infinity_test +25 -0
- data/lib/generators/echo_base/templates/.rspec +1 -0
- data/lib/generators/echo_base/templates/.rvmrc +1 -0
- data/lib/generators/echo_base/templates/Capfile +4 -0
- data/lib/generators/echo_base/templates/Gemfile +37 -0
- data/lib/generators/echo_base/templates/Gemfile.lock +235 -0
- data/lib/generators/echo_base/templates/app/controllers/application_controller.rb +20 -0
- data/lib/generators/echo_base/templates/app/controllers/sessions_controller.rb +15 -0
- data/lib/generators/echo_base/templates/app/controllers/users_controller.rb +83 -0
- data/lib/generators/echo_base/templates/app/helpers/application_helper.rb +2 -0
- data/lib/generators/echo_base/templates/app/helpers/sessions_helper.rb +2 -0
- data/lib/generators/echo_base/templates/app/helpers/users_helper.rb +2 -0
- data/lib/generators/echo_base/templates/app/models/authorization.rb +14 -0
- data/lib/generators/echo_base/templates/app/models/user.rb +11 -0
- data/lib/generators/echo_base/templates/app/views/shared/_js.html.erb +14 -0
- data/lib/generators/echo_base/templates/app/views/users/_form.html.erb +37 -0
- data/lib/generators/echo_base/templates/app/views/users/_sidebar.html.erb +13 -0
- data/lib/generators/echo_base/templates/app/views/users/edit.html.erb +19 -0
- data/lib/generators/echo_base/templates/app/views/users/index.html.erb +48 -0
- data/lib/generators/echo_base/templates/app/views/users/new.html.erb +18 -0
- data/lib/generators/echo_base/templates/app/views/users/show.html.erb +44 -0
- data/lib/generators/echo_base/templates/application.html.erb +48 -0
- data/lib/generators/echo_base/templates/autotest/discover.rb +2 -0
- data/lib/generators/echo_base/templates/config/cucumber.yml +8 -0
- data/lib/generators/echo_base/templates/config/deploy.rb +24 -0
- data/lib/generators/echo_base/templates/config/environments/development.rb +26 -0
- data/lib/generators/echo_base/templates/config/environments/production.rb +50 -0
- data/lib/generators/echo_base/templates/config/environments/test.rb +35 -0
- data/lib/generators/echo_base/templates/config/initializers/hoptoad.rb +4 -0
- data/lib/generators/echo_base/templates/config/initializers/omniauth.rb +10 -0
- data/lib/generators/echo_base/templates/config/newrelic.yml.example +0 -0
- data/lib/generators/echo_base/templates/config/omniauth.yml.example +62 -0
- data/lib/generators/echo_base/templates/config/routes.rb +5 -0
- data/lib/generators/echo_base/templates/db/migrate/20101008210657_create_authorizations.rb +15 -0
- data/lib/generators/echo_base/templates/db/migrate/20101009192412_create_users.rb +17 -0
- data/lib/generators/echo_base/templates/features/manage_authentications.feature +45 -0
- data/lib/generators/echo_base/templates/features/manage_users.feature +45 -0
- data/lib/generators/echo_base/templates/features/step_definitions/authentication_steps.rb +14 -0
- data/lib/generators/echo_base/templates/features/step_definitions/users_steps.rb +14 -0
- data/lib/generators/echo_base/templates/features/step_definitions/web_steps.rb +219 -0
- data/lib/generators/echo_base/templates/features/support/env.rb +57 -0
- data/lib/generators/echo_base/templates/features/support/paths.rb +39 -0
- data/lib/generators/echo_base/templates/public/404.html +26 -0
- data/lib/generators/echo_base/templates/public/422.html +26 -0
- data/lib/generators/echo_base/templates/public/500.html +26 -0
- data/lib/generators/echo_base/templates/public/favicon.ico +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/arrow.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/avatar.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/boxbar-background.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/breadcrumb.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/button-background-active.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/button-background.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/24/about +12 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/24/anchor-hover.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/24/anchor.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/24/cross-hover.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/24/cross.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/24/download-hover.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/24/download.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/24/edit-hover.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/24/edit.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/24/export-hover.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/24/export.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/24/show-hover.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/24/show.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/add.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/application_edit.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/calendar-hover.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/calendar.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/cross.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/delete.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/download.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/edit.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/key.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/pdf.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/search.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/see-less.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/see-more.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/send-mail.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/show.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/source +1 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/tick.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/icons/upload.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/logo.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/menubar-background.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/search-button.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/session/account.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/session/config.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/session/home.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/session/logout.png +0 -0
- data/lib/generators/echo_base/templates/public/images/web-app-theme/tipsy.gif +0 -0
- data/lib/generators/echo_base/templates/public/javascripts/application.js +2 -0
- data/lib/generators/echo_base/templates/public/javascripts/dd_belatedpng.js +328 -0
- data/lib/generators/echo_base/templates/public/javascripts/jquery-1.4.2.min.js +154 -0
- data/lib/generators/echo_base/templates/public/javascripts/modernizr-1.5.min.js +28 -0
- data/lib/generators/echo_base/templates/public/javascripts/rails.js +132 -0
- data/lib/generators/echo_base/templates/public/robots.txt +5 -0
- data/lib/generators/echo_base/templates/public/stylesheets/.gitkeep +0 -0
- data/lib/generators/echo_base/templates/public/stylesheets/handheld.css +7 -0
- data/lib/generators/echo_base/templates/public/stylesheets/style.css +571 -0
- data/lib/generators/echo_base/templates/public/stylesheets/web-app-theme/base.css +397 -0
- data/lib/generators/echo_base/templates/public/stylesheets/web-app-theme/override.css +1 -0
- data/lib/generators/echo_base/templates/public/stylesheets/web-app-theme/themes/default/images/arrow.png +0 -0
- data/lib/generators/echo_base/templates/public/stylesheets/web-app-theme/themes/default/images/boxbar-background.png +0 -0
- data/lib/generators/echo_base/templates/public/stylesheets/web-app-theme/themes/default/images/button-background-active.png +0 -0
- data/lib/generators/echo_base/templates/public/stylesheets/web-app-theme/themes/default/images/button-background.png +0 -0
- data/lib/generators/echo_base/templates/public/stylesheets/web-app-theme/themes/default/images/menubar-background.png +0 -0
- data/lib/generators/echo_base/templates/public/stylesheets/web-app-theme/themes/default/style.css +466 -0
- data/lib/generators/echo_base/templates/spec/controllers/sessions_controller_spec.rb +5 -0
- data/lib/generators/echo_base/templates/spec/controllers/users_controller_spec.rb +125 -0
- data/lib/generators/echo_base/templates/spec/helpers/users_helper_spec.rb +15 -0
- data/lib/generators/echo_base/templates/spec/models/authorization_spec.rb +5 -0
- data/lib/generators/echo_base/templates/spec/models/user_spec.rb +5 -0
- data/lib/generators/echo_base/templates/spec/routing/users_routing_spec.rb +35 -0
- data/lib/generators/echo_base/templates/spec/spec_helper.rb +16 -0
- data/lib/generators/echo_base/templates/spec/views/users/edit.html.erb_spec.rb +27 -0
- data/lib/generators/echo_base/templates/spec/views/users/index.html.erb_spec.rb +36 -0
- data/lib/generators/echo_base/templates/spec/views/users/new.html.erb_spec.rb +27 -0
- data/lib/generators/echo_base/templates/spec/views/users/show.html.erb_spec.rb +27 -0
- data/test/helper.rb +10 -0
- data/test/test_echo_base.rb +7 -0
- metadata +145 -36
- data/Gemfile +0 -4
- data/lib/echo_base/version.rb +0 -3
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
GEM
|
|
2
|
+
remote: http://rubygems.org/
|
|
3
|
+
specs:
|
|
4
|
+
abstract (1.0.0)
|
|
5
|
+
actionmailer (3.0.0)
|
|
6
|
+
actionpack (= 3.0.0)
|
|
7
|
+
mail (~> 2.2.5)
|
|
8
|
+
actionpack (3.0.0)
|
|
9
|
+
activemodel (= 3.0.0)
|
|
10
|
+
activesupport (= 3.0.0)
|
|
11
|
+
builder (~> 2.1.2)
|
|
12
|
+
erubis (~> 2.6.6)
|
|
13
|
+
i18n (~> 0.4.1)
|
|
14
|
+
rack (~> 1.2.1)
|
|
15
|
+
rack-mount (~> 0.6.12)
|
|
16
|
+
rack-test (~> 0.5.4)
|
|
17
|
+
tzinfo (~> 0.3.23)
|
|
18
|
+
activemodel (3.0.0)
|
|
19
|
+
activesupport (= 3.0.0)
|
|
20
|
+
builder (~> 2.1.2)
|
|
21
|
+
i18n (~> 0.4.1)
|
|
22
|
+
activerecord (3.0.0)
|
|
23
|
+
activemodel (= 3.0.0)
|
|
24
|
+
activesupport (= 3.0.0)
|
|
25
|
+
arel (~> 1.0.0)
|
|
26
|
+
tzinfo (~> 0.3.23)
|
|
27
|
+
activeresource (3.0.0)
|
|
28
|
+
activemodel (= 3.0.0)
|
|
29
|
+
activesupport (= 3.0.0)
|
|
30
|
+
activesupport (3.0.0)
|
|
31
|
+
addressable (2.2.1)
|
|
32
|
+
arel (1.0.1)
|
|
33
|
+
activesupport (~> 3.0.0)
|
|
34
|
+
awesome_print (0.2.1)
|
|
35
|
+
builder (2.1.2)
|
|
36
|
+
capistrano (2.5.19)
|
|
37
|
+
highline
|
|
38
|
+
net-scp (>= 1.0.0)
|
|
39
|
+
net-sftp (>= 2.0.0)
|
|
40
|
+
net-ssh (>= 2.0.14)
|
|
41
|
+
net-ssh-gateway (>= 1.0.0)
|
|
42
|
+
capistrano-ext (1.2.1)
|
|
43
|
+
capistrano (>= 1.0.0)
|
|
44
|
+
capybara (0.3.9)
|
|
45
|
+
culerity (>= 0.2.4)
|
|
46
|
+
mime-types (>= 1.16)
|
|
47
|
+
nokogiri (>= 1.3.3)
|
|
48
|
+
rack (>= 1.0.0)
|
|
49
|
+
rack-test (>= 0.5.4)
|
|
50
|
+
selenium-webdriver (>= 0.0.3)
|
|
51
|
+
configuration (1.1.0)
|
|
52
|
+
crack (0.1.8)
|
|
53
|
+
cucumber (0.9.2)
|
|
54
|
+
builder (~> 2.1.2)
|
|
55
|
+
diff-lcs (~> 1.1.2)
|
|
56
|
+
gherkin (~> 2.2.5)
|
|
57
|
+
json (~> 1.4.6)
|
|
58
|
+
term-ansicolor (~> 1.0.5)
|
|
59
|
+
cucumber-rails (0.3.2)
|
|
60
|
+
cucumber (>= 0.8.0)
|
|
61
|
+
culerity (0.2.12)
|
|
62
|
+
dalli (0.9.9)
|
|
63
|
+
diff-lcs (1.1.2)
|
|
64
|
+
erubis (2.6.6)
|
|
65
|
+
abstract (>= 1.0.0)
|
|
66
|
+
factory_girl (1.3.2)
|
|
67
|
+
faraday (0.4.6)
|
|
68
|
+
addressable (>= 2.1.1)
|
|
69
|
+
rack (>= 1.0.1)
|
|
70
|
+
ffi (0.6.3)
|
|
71
|
+
rake (>= 0.8.7)
|
|
72
|
+
formtastic (1.1.0)
|
|
73
|
+
actionpack (>= 2.3.0)
|
|
74
|
+
activesupport (>= 2.3.0)
|
|
75
|
+
i18n (>= 0.4.0)
|
|
76
|
+
gherkin (2.2.8)
|
|
77
|
+
json (~> 1.4.6)
|
|
78
|
+
term-ansicolor (~> 1.0.5)
|
|
79
|
+
heroku (1.10.14)
|
|
80
|
+
json_pure (>= 1.2.0, < 1.5.0)
|
|
81
|
+
launchy (~> 0.3.2)
|
|
82
|
+
rest-client (>= 1.4.0, < 1.7.0)
|
|
83
|
+
highline (1.6.1)
|
|
84
|
+
hoptoad_notifier (2.3.8)
|
|
85
|
+
activesupport
|
|
86
|
+
i18n (0.4.1)
|
|
87
|
+
infinity_test (0.2.0)
|
|
88
|
+
watchr (>= 0.7)
|
|
89
|
+
jonrowe-database_cleaner (0.5.2)
|
|
90
|
+
jquery-rails (0.2.1)
|
|
91
|
+
rails (~> 3.0.0)
|
|
92
|
+
json (1.4.6)
|
|
93
|
+
json_pure (1.4.6)
|
|
94
|
+
launchy (0.3.7)
|
|
95
|
+
configuration (>= 0.0.5)
|
|
96
|
+
rake (>= 0.8.1)
|
|
97
|
+
mail (2.2.7)
|
|
98
|
+
activesupport (>= 2.3.6)
|
|
99
|
+
mime-types
|
|
100
|
+
treetop (>= 1.4.5)
|
|
101
|
+
mime-types (1.16)
|
|
102
|
+
multi_json (0.0.4)
|
|
103
|
+
mysql (2.8.1)
|
|
104
|
+
net-ldap (0.1.1)
|
|
105
|
+
net-scp (1.0.4)
|
|
106
|
+
net-ssh (>= 1.99.1)
|
|
107
|
+
net-sftp (2.0.5)
|
|
108
|
+
net-ssh (>= 2.0.9)
|
|
109
|
+
net-ssh (2.0.23)
|
|
110
|
+
net-ssh-gateway (1.0.1)
|
|
111
|
+
net-ssh (>= 1.99.1)
|
|
112
|
+
newrelic_rpm (2.13.2)
|
|
113
|
+
nokogiri (1.4.3.1)
|
|
114
|
+
oa-basic (0.1.2)
|
|
115
|
+
multi_json (~> 0.0.2)
|
|
116
|
+
nokogiri (~> 1.4.2)
|
|
117
|
+
oa-core (= 0.1.2)
|
|
118
|
+
rest-client (~> 1.6.0)
|
|
119
|
+
oa-core (0.1.2)
|
|
120
|
+
rack (~> 1.1)
|
|
121
|
+
oa-enterprise (0.1.2)
|
|
122
|
+
net-ldap (~> 0.1.1)
|
|
123
|
+
nokogiri (~> 1.4.2)
|
|
124
|
+
oa-core (= 0.1.2)
|
|
125
|
+
rubyntlm (~> 0.1.1)
|
|
126
|
+
oa-oauth (0.1.2)
|
|
127
|
+
multi_json (~> 0.0.2)
|
|
128
|
+
nokogiri (~> 1.4.2)
|
|
129
|
+
oa-core (= 0.1.2)
|
|
130
|
+
oauth (~> 0.4.0)
|
|
131
|
+
oauth2 (~> 0.0.10)
|
|
132
|
+
oa-openid (0.1.2)
|
|
133
|
+
oa-core (= 0.1.2)
|
|
134
|
+
rack-openid (~> 1.1.1)
|
|
135
|
+
ruby-openid-apps-discovery
|
|
136
|
+
oauth (0.4.3)
|
|
137
|
+
oauth2 (0.0.13)
|
|
138
|
+
faraday (~> 0.4.1)
|
|
139
|
+
multi_json (>= 0.0.4)
|
|
140
|
+
omniauth (0.1.2)
|
|
141
|
+
oa-basic (= 0.1.2)
|
|
142
|
+
oa-core (= 0.1.2)
|
|
143
|
+
oa-enterprise (= 0.1.2)
|
|
144
|
+
oa-oauth (= 0.1.2)
|
|
145
|
+
oa-openid (= 0.1.2)
|
|
146
|
+
polyglot (0.3.1)
|
|
147
|
+
rack (1.2.1)
|
|
148
|
+
rack-cache (0.5.3)
|
|
149
|
+
rack (>= 0.4)
|
|
150
|
+
rack-mount (0.6.13)
|
|
151
|
+
rack (>= 1.0.0)
|
|
152
|
+
rack-openid (1.1.2)
|
|
153
|
+
rack (>= 0.4)
|
|
154
|
+
ruby-openid (>= 2.0.3)
|
|
155
|
+
rack-test (0.5.6)
|
|
156
|
+
rack (>= 1.0)
|
|
157
|
+
rails (3.0.0)
|
|
158
|
+
actionmailer (= 3.0.0)
|
|
159
|
+
actionpack (= 3.0.0)
|
|
160
|
+
activerecord (= 3.0.0)
|
|
161
|
+
activeresource (= 3.0.0)
|
|
162
|
+
activesupport (= 3.0.0)
|
|
163
|
+
bundler (~> 1.0.0)
|
|
164
|
+
railties (= 3.0.0)
|
|
165
|
+
railties (3.0.0)
|
|
166
|
+
actionpack (= 3.0.0)
|
|
167
|
+
activesupport (= 3.0.0)
|
|
168
|
+
rake (>= 0.8.4)
|
|
169
|
+
thor (~> 0.14.0)
|
|
170
|
+
rake (0.8.7)
|
|
171
|
+
rest-client (1.6.1)
|
|
172
|
+
mime-types (>= 1.16)
|
|
173
|
+
rspec (2.0.0.rc)
|
|
174
|
+
rspec-core (= 2.0.0.rc)
|
|
175
|
+
rspec-expectations (= 2.0.0.rc)
|
|
176
|
+
rspec-mocks (= 2.0.0.rc)
|
|
177
|
+
rspec-core (2.0.0.rc)
|
|
178
|
+
rspec-expectations (2.0.0.rc)
|
|
179
|
+
diff-lcs (>= 1.1.2)
|
|
180
|
+
rspec-mocks (2.0.0.rc)
|
|
181
|
+
rspec-core (= 2.0.0.rc)
|
|
182
|
+
rspec-expectations (= 2.0.0.rc)
|
|
183
|
+
rspec-rails (2.0.0.rc)
|
|
184
|
+
rspec (= 2.0.0.rc)
|
|
185
|
+
ruby-openid (2.1.8)
|
|
186
|
+
ruby-openid-apps-discovery (1.2.0)
|
|
187
|
+
ruby-openid (>= 2.1.7)
|
|
188
|
+
rubyntlm (0.1.1)
|
|
189
|
+
rubyzip (0.9.4)
|
|
190
|
+
selenium-webdriver (0.0.28)
|
|
191
|
+
ffi (>= 0.6.1)
|
|
192
|
+
json_pure
|
|
193
|
+
rubyzip
|
|
194
|
+
term-ansicolor (1.0.5)
|
|
195
|
+
thor (0.14.3)
|
|
196
|
+
treetop (1.4.8)
|
|
197
|
+
polyglot (>= 0.3.1)
|
|
198
|
+
tzinfo (0.3.23)
|
|
199
|
+
unicorn (1.1.4)
|
|
200
|
+
rack
|
|
201
|
+
watchr (0.7)
|
|
202
|
+
web-app-theme (0.6.2)
|
|
203
|
+
webmock (1.3.5)
|
|
204
|
+
addressable (>= 2.1.1)
|
|
205
|
+
crack (>= 0.1.7)
|
|
206
|
+
will_paginate (3.0.pre2)
|
|
207
|
+
|
|
208
|
+
PLATFORMS
|
|
209
|
+
ruby
|
|
210
|
+
|
|
211
|
+
DEPENDENCIES
|
|
212
|
+
awesome_print
|
|
213
|
+
capistrano
|
|
214
|
+
capistrano-ext
|
|
215
|
+
capybara
|
|
216
|
+
cucumber
|
|
217
|
+
cucumber-rails
|
|
218
|
+
dalli
|
|
219
|
+
factory_girl
|
|
220
|
+
formtastic
|
|
221
|
+
heroku
|
|
222
|
+
hoptoad_notifier
|
|
223
|
+
infinity_test
|
|
224
|
+
jonrowe-database_cleaner (= 0.5.2)
|
|
225
|
+
jquery-rails
|
|
226
|
+
mysql
|
|
227
|
+
newrelic_rpm
|
|
228
|
+
omniauth
|
|
229
|
+
rack-cache
|
|
230
|
+
rails (= 3.0.0)
|
|
231
|
+
rspec-rails (>= 2.0.0.beta.20)
|
|
232
|
+
unicorn
|
|
233
|
+
web-app-theme (>= 0.6.2)
|
|
234
|
+
webmock
|
|
235
|
+
will_paginate (>= 3.0.pre2)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
class ApplicationController < ActionController::Base
|
|
2
|
+
protect_from_forgery
|
|
3
|
+
|
|
4
|
+
protected
|
|
5
|
+
|
|
6
|
+
def current_user
|
|
7
|
+
@current_user ||= User.find_by_id(session[:user_id])
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def signed_in?
|
|
11
|
+
!!current_user
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
helper_method :current_user, :signed_in?
|
|
15
|
+
|
|
16
|
+
def current_user=(user)
|
|
17
|
+
@current_user = user
|
|
18
|
+
session[:user_id] = user.id
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
class SessionsController < ApplicationController
|
|
2
|
+
def create
|
|
3
|
+
auth = request.env['rack.auth']
|
|
4
|
+
Rails.logger.info auth.inspect
|
|
5
|
+
unless @auth = Authorization.find_from_hash(auth)
|
|
6
|
+
# Create a new user or add an auth to existing user, depending on
|
|
7
|
+
# whether there is already a user signed in.
|
|
8
|
+
@auth = Authorization.create_from_hash(auth, current_user)
|
|
9
|
+
end
|
|
10
|
+
# Log the authorizing user in.
|
|
11
|
+
self.current_user = @auth.user
|
|
12
|
+
|
|
13
|
+
redirect_to user_path(self.current_user), :notice => "Welcome, #{current_user.name}."
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
class UsersController < ApplicationController
|
|
2
|
+
# GET /users
|
|
3
|
+
# GET /users.xml
|
|
4
|
+
def index
|
|
5
|
+
@users = User.all
|
|
6
|
+
|
|
7
|
+
respond_to do |format|
|
|
8
|
+
format.html # index.html.erb
|
|
9
|
+
format.xml { render :xml => @users }
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# GET /users/1
|
|
14
|
+
# GET /users/1.xml
|
|
15
|
+
def show
|
|
16
|
+
@user = User.find(params[:id])
|
|
17
|
+
|
|
18
|
+
respond_to do |format|
|
|
19
|
+
format.html # show.html.erb
|
|
20
|
+
format.xml { render :xml => @user }
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# GET /users/new
|
|
25
|
+
# GET /users/new.xml
|
|
26
|
+
def new
|
|
27
|
+
@user = User.new
|
|
28
|
+
|
|
29
|
+
respond_to do |format|
|
|
30
|
+
format.html # new.html.erb
|
|
31
|
+
format.xml { render :xml => @user }
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# GET /users/1/edit
|
|
36
|
+
def edit
|
|
37
|
+
@user = User.find(params[:id])
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# POST /users
|
|
41
|
+
# POST /users.xml
|
|
42
|
+
def create
|
|
43
|
+
@user = User.new(params[:user])
|
|
44
|
+
|
|
45
|
+
respond_to do |format|
|
|
46
|
+
if @user.save
|
|
47
|
+
format.html { redirect_to(@user, :notice => 'User was successfully created.') }
|
|
48
|
+
format.xml { render :xml => @user, :status => :created, :location => @user }
|
|
49
|
+
else
|
|
50
|
+
format.html { render :action => "new" }
|
|
51
|
+
format.xml { render :xml => @user.errors, :status => :unprocessable_entity }
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# PUT /users/1
|
|
57
|
+
# PUT /users/1.xml
|
|
58
|
+
def update
|
|
59
|
+
@user = User.find(params[:id])
|
|
60
|
+
|
|
61
|
+
respond_to do |format|
|
|
62
|
+
if @user.update_attributes(params[:user])
|
|
63
|
+
format.html { redirect_to(@user, :notice => 'User was successfully updated.') }
|
|
64
|
+
format.xml { head :ok }
|
|
65
|
+
else
|
|
66
|
+
format.html { render :action => "edit" }
|
|
67
|
+
format.xml { render :xml => @user.errors, :status => :unprocessable_entity }
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# DELETE /users/1
|
|
73
|
+
# DELETE /users/1.xml
|
|
74
|
+
def destroy
|
|
75
|
+
@user = User.find(params[:id])
|
|
76
|
+
@user.destroy
|
|
77
|
+
|
|
78
|
+
respond_to do |format|
|
|
79
|
+
format.html { redirect_to(users_url) }
|
|
80
|
+
format.xml { head :ok }
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
class Authorization < ActiveRecord::Base
|
|
2
|
+
belongs_to :user
|
|
3
|
+
validates_presence_of :user_id, :uid, :provider
|
|
4
|
+
validates_uniqueness_of :uid, :scope => :provider
|
|
5
|
+
|
|
6
|
+
def self.find_from_hash(hash)
|
|
7
|
+
find_by_provider_and_uid(hash['provider'], hash['uid'])
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def self.create_from_hash(hash, user = nil)
|
|
11
|
+
user ||= User.create_from_hash!(hash)
|
|
12
|
+
Authorization.create(:user => user, :uid => hash['uid'], :provider => hash['provider'])
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
class User < ActiveRecord::Base
|
|
2
|
+
has_many :authorizations
|
|
3
|
+
|
|
4
|
+
def self.create_from_hash!(hash)
|
|
5
|
+
create(:name => hash['user_info']['name'],
|
|
6
|
+
:location => hash['user_info']['location'] || "",
|
|
7
|
+
:nickname => hash['user_info']['nickname'] || "",
|
|
8
|
+
:image => hash['user_info']['image'] || "",
|
|
9
|
+
:description => hash['user_info']['description'] || "")
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
|
|
2
|
+
<script>!window.jQuery && document.write('<script src="/javascripts/jquery-1.4.2.min.js"><\/script>')</script>
|
|
3
|
+
<%= javascript_include_tag :defaults, :cache => true %>
|
|
4
|
+
<!--[if lt IE 7 ]>
|
|
5
|
+
<script src="/javascripts/dd_belatedpng.js?v=1"></script>
|
|
6
|
+
<![endif]-->
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
var _gaq = [['_setAccount', 'UA-XXXXX-X'], ['_trackPageview']];
|
|
10
|
+
(function(d, t) {
|
|
11
|
+
var g = d.createElement(t), s = d.getElementsByTagName(t)[0];
|
|
12
|
+
g.async = true; g.src = '//www.google-analytics.com/ga.js'; s.parentNode.insertBefore(g, s);
|
|
13
|
+
})(document, 'script');
|
|
14
|
+
</script>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
<div class="group">
|
|
3
|
+
<%= f.label :name, t("activerecord.attributes.user.name", :default => "Name"), :class => :label %>
|
|
4
|
+
<%= f.text_field :name, :class => 'text_field' %>
|
|
5
|
+
<span class="description">Ex: a simple text</span>
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<div class="group">
|
|
9
|
+
<%= f.label :nickname, t("activerecord.attributes.user.nickname", :default => "Nickname"), :class => :label %>
|
|
10
|
+
<%= f.text_field :nickname, :class => 'text_field' %>
|
|
11
|
+
<span class="description">Ex: a simple text</span>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<div class="group">
|
|
15
|
+
<%= f.label :image, t("activerecord.attributes.user.image", :default => "Image"), :class => :label %>
|
|
16
|
+
<%= f.text_field :image, :class => 'text_field' %>
|
|
17
|
+
<span class="description">Ex: a simple text</span>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<div class="group">
|
|
21
|
+
<%= f.label :description, t("activerecord.attributes.user.description", :default => "Description"), :class => :label %>
|
|
22
|
+
<%= f.text_field :description, :class => 'text_field' %>
|
|
23
|
+
<span class="description">Ex: a simple text</span>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<div class="group">
|
|
27
|
+
<%= f.label :location, t("activerecord.attributes.user.location", :default => "Location"), :class => :label %>
|
|
28
|
+
<%= f.text_field :location, :class => 'text_field' %>
|
|
29
|
+
<span class="description">Ex: a simple text</span>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<div class="group navform wat-cf">
|
|
33
|
+
<button class="button" type="submit">
|
|
34
|
+
<%= image_tag("web-app-theme/icons/tick.png", :alt => "#{t("web-app-theme.save", :default => "Save")}") %> <%= t("web-app-theme.save", :default => "Save") %>
|
|
35
|
+
</button>
|
|
36
|
+
<%= link_to image_tag("web-app-theme/icons/cross.png", :alt => "#{t("web-app-theme.cancel", :default => "Cancel")}") + " " + t("web-app-theme.cancel", :default => "Cancel"), users_path, :class => "button" %>
|
|
37
|
+
</div>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<div class="block notice">
|
|
2
|
+
<h3>Simple Block</h3>
|
|
3
|
+
<div class="content">
|
|
4
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
|
|
5
|
+
</div>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="block">
|
|
8
|
+
<h3>Links</h3>
|
|
9
|
+
<ul class="navigation">
|
|
10
|
+
<li><a href="#">Link 1</a></li>
|
|
11
|
+
<li><a href="#">Link 2</a></li>
|
|
12
|
+
</ul>
|
|
13
|
+
</div>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<div class="block">
|
|
2
|
+
<div class="secondary-navigation">
|
|
3
|
+
<ul class="wat-cf">
|
|
4
|
+
<li class="first"><%= link_to "#{t("web-app-theme.list", :default => "List")}", users_path %></li>
|
|
5
|
+
<li><%= link_to "#{t("web-app-theme.new", :default => "New")}", new_user_path %></li>
|
|
6
|
+
<li class="active"><%= link_to "#{t("web-app-theme.edit", :default => "Edit")}", edit_user_path %></li>
|
|
7
|
+
</ul>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="content">
|
|
10
|
+
<h2 class="title"><%= t("web-app-theme.edit", :default => "Edit") %> User</h2>
|
|
11
|
+
<div class="inner">
|
|
12
|
+
<%= form_for @user, :url => user_path(@user), :html => { :class => :form } do |f| -%>
|
|
13
|
+
<%= render :partial => "form", :locals => {:f => f} %>
|
|
14
|
+
<% end -%>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<% content_for :sidebar, render(:partial => 'sidebar') -%>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<div class="block">
|
|
2
|
+
<div class="secondary-navigation">
|
|
3
|
+
<ul class="wat-cf">
|
|
4
|
+
<li class="first active"><%= link_to "#{t("web-app-theme.list", :default => "List")}", users_path %></li>
|
|
5
|
+
<li><%= link_to "#{t("web-app-theme.new", :default => "New")}", new_user_path %></li>
|
|
6
|
+
</ul>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="content">
|
|
9
|
+
<h2 class="title"><%= t("web-app-theme.all", :default => "All") %> Users</h2>
|
|
10
|
+
<div class="inner">
|
|
11
|
+
<table class="table">
|
|
12
|
+
<tr>
|
|
13
|
+
<th class="first">ID</th>
|
|
14
|
+
<th>
|
|
15
|
+
<%= t("activerecord.attributes.user.name", :default => t("activerecord.labels.name", :default => "Name")) %>
|
|
16
|
+
</th>
|
|
17
|
+
<th><%= t("web-app-theme.created_at", :default => "Created at") %></th>
|
|
18
|
+
<th class="last"> </th>
|
|
19
|
+
</tr>
|
|
20
|
+
<% @users.each do |user| -%>
|
|
21
|
+
<tr class="<%= cycle("odd", "even") %>">
|
|
22
|
+
<td>
|
|
23
|
+
<%= user.id %>
|
|
24
|
+
</td>
|
|
25
|
+
<td>
|
|
26
|
+
<%= link_to user.name, user_path(user) %>
|
|
27
|
+
</td>
|
|
28
|
+
<td>
|
|
29
|
+
<%= user.created_at %>
|
|
30
|
+
</td>
|
|
31
|
+
<td class="last">
|
|
32
|
+
<%= link_to "#{t("web-app-theme.show", :default => "Show")}", user_path(user) %> |
|
|
33
|
+
<%= link_to "#{t("web-app-theme.edit", :default => "Edit")}", edit_user_path(user) %> |
|
|
34
|
+
<%= link_to "#{t("web-app-theme.delete", :default => "Delete")}", user_path(user), :method => :delete, :confirm => "#{t("web-app-theme.confirm", :default => "Are you sure?")}" %>
|
|
35
|
+
</td>
|
|
36
|
+
</tr>
|
|
37
|
+
<% end -%>
|
|
38
|
+
</table>
|
|
39
|
+
<div class="actions-bar wat-cf">
|
|
40
|
+
<div class="actions">
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<% content_for :sidebar, render(:partial => 'sidebar') -%>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<div class="block">
|
|
2
|
+
<div class="secondary-navigation">
|
|
3
|
+
<ul class="wat-cf">
|
|
4
|
+
<li class="first"><%= link_to "#{t("web-app-theme.list", :default => "List")}", users_path %></li>
|
|
5
|
+
<li class="active"><%= link_to "#{t("web-app-theme.new", :default => "New")}", new_user_path %></li>
|
|
6
|
+
</ul>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="content">
|
|
9
|
+
<h2 class="title"><%= t("web-app-theme.new", :default => "New")%> User</h2>
|
|
10
|
+
<div class="inner">
|
|
11
|
+
<%= form_for :user, :url => users_path, :html => { :class => :form } do |f| -%>
|
|
12
|
+
<%= render :partial => "form", :locals => {:f => f} %>
|
|
13
|
+
<% end -%>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<% content_for :sidebar, render(:partial => 'sidebar') -%>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<div class="block">
|
|
2
|
+
<div class="secondary-navigation">
|
|
3
|
+
<ul class="wat-cf">
|
|
4
|
+
<li class="first"><%= link_to "#{t("web-app-theme.list", :default => "List")}", users_path %></li>
|
|
5
|
+
<li><%= link_to "#{t("web-app-theme.new", :default => "New")}", new_user_path %></li>
|
|
6
|
+
<li class="active"><%= link_to "#{t("web-app-theme.show", :default => "Show")}", user_path %></li>
|
|
7
|
+
</ul>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="content">
|
|
10
|
+
<div class="inner">
|
|
11
|
+
|
|
12
|
+
<p>
|
|
13
|
+
<b><%= t("activerecord.attributes.user.name", :default => t("activerecord.labels.name", :default => "Name")) %>:</b>
|
|
14
|
+
<%= @user.name %>
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
<p>
|
|
18
|
+
<b><%= t("activerecord.attributes.user.nickname", :default => t("activerecord.labels.nickname", :default => "Nickname")) %>:</b>
|
|
19
|
+
<%= @user.nickname %>
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
<p>
|
|
23
|
+
<b><%= t("activerecord.attributes.user.image", :default => t("activerecord.labels.image", :default => "Image")) %>:</b>
|
|
24
|
+
<%= image_tag(@user.image, :alt => @user.nickname) %>
|
|
25
|
+
</p>
|
|
26
|
+
|
|
27
|
+
<p>
|
|
28
|
+
<b><%= t("activerecord.attributes.user.description", :default => t("activerecord.labels.description", :default => "Description")) %>:</b>
|
|
29
|
+
<%= @user.description %>
|
|
30
|
+
</p>
|
|
31
|
+
|
|
32
|
+
<p>
|
|
33
|
+
<b><%= t("activerecord.attributes.user.location", :default => t("activerecord.labels.location", :default => "Location")) %>:</b>
|
|
34
|
+
<%= @user.location %>
|
|
35
|
+
</p>
|
|
36
|
+
<div class="wat-cf">
|
|
37
|
+
<%= link_to image_tag("web-app-theme/icons/application_edit.png", :alt => "#{t("web-app-theme.edit", :default=> "Edit")}") + " " + t("web-app-theme.edit", :default=> "Edit"), edit_user_path(@user), :class => "button" %>
|
|
38
|
+
<%= link_to image_tag("web-app-theme/icons/cross.png", :alt => "#{t("web-app-theme.delete", :default=> "Delete")}") + " " + t("web-app-theme.delete", :default => "Delete"), user_path(@user), :method => "delete", :class => "button", :confirm => "#{t("web-app-theme.confirm", :default => "Are you sure?")}" %>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<% content_for :sidebar, render(:partial => 'sidebar') -%>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title><%=app_name%></title>
|
|
5
|
+
<%%= stylesheet_link_tag "web-app-theme/base", "web-app-theme/themes/default/style", "web-app-theme/override", :cache => true %>
|
|
6
|
+
<%%= javascript_include_tag :all, :cache => true %>
|
|
7
|
+
<%%= csrf_meta_tag %>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="container">
|
|
11
|
+
<div id="header">
|
|
12
|
+
<h1><%%=link_to "<%=app_name%>", root_path %></h1>
|
|
13
|
+
<div id="user-navigation">
|
|
14
|
+
<ul class="wat-cf">
|
|
15
|
+
<li><a href="#"><%%= t("web-app-theme.profile", :default => "Profile") %></a></li>
|
|
16
|
+
<li><a href="#"><%%= t("web-app-theme.settings", :default => "Settings") %></a></li>
|
|
17
|
+
<li><a href="/logout" class="logout"><%%= t("web-app-theme.logout", :default => "Logout") %></a></li>
|
|
18
|
+
</ul>
|
|
19
|
+
</div>
|
|
20
|
+
<div id="main-navigation">
|
|
21
|
+
<ul class="wat-cf">
|
|
22
|
+
<li class="first active"><a href="#"><%%= t("web-app-theme.home", :default => "Home") %></a></li>
|
|
23
|
+
</ul>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
<div id="wrapper" class="wat-cf">
|
|
27
|
+
<div class="flash">
|
|
28
|
+
<%% flash.each do |type, message| -%>
|
|
29
|
+
<div class="message <%%= type %>">
|
|
30
|
+
<p><%%= message %></p>
|
|
31
|
+
</div>
|
|
32
|
+
<%% end -%>
|
|
33
|
+
</div>
|
|
34
|
+
<div id="main">
|
|
35
|
+
<%%= yield %>
|
|
36
|
+
<div id="footer">
|
|
37
|
+
<div class="block">
|
|
38
|
+
<p>Copyright © <%%= Time.now.year %> <%=app_name%></p>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
<div id="sidebar">
|
|
43
|
+
<%%= yield :sidebar %>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</body>
|
|
48
|
+
</html>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<%
|
|
2
|
+
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
|
|
3
|
+
rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
|
|
4
|
+
std_opts = "--format pretty --strict --tags ~@wip"
|
|
5
|
+
%>
|
|
6
|
+
default: <%= std_opts %> features
|
|
7
|
+
wip: --tags @wip:3 --wip features
|
|
8
|
+
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
|