mobile_view 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. data/.gitignore +8 -0
  2. data/.rspec +1 -0
  3. data/Gemfile +17 -0
  4. data/Gemfile.lock +137 -0
  5. data/README.markdown +59 -0
  6. data/Rakefile +32 -0
  7. data/lib/mobile_view/controller_helper.rb +8 -0
  8. data/lib/mobile_view/engine.rb +22 -0
  9. data/lib/mobile_view/resolver.rb +9 -0
  10. data/lib/mobile_view/version.rb +3 -0
  11. data/lib/mobile_view.rb +13 -0
  12. data/lib/tasks/mobile_view_tasks.rake +4 -0
  13. data/mobile_view.gemspec +23 -0
  14. data/spec/dummy/README.rdoc +261 -0
  15. data/spec/dummy/Rakefile +7 -0
  16. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  17. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  18. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  19. data/spec/dummy/app/controllers/pages_controller.rb +27 -0
  20. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  21. data/spec/dummy/app/mailers/.gitkeep +0 -0
  22. data/spec/dummy/app/models/.gitkeep +0 -0
  23. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  24. data/spec/dummy/app/views/layouts/yet-another.html.erb +14 -0
  25. data/spec/dummy/app/views/layouts/yet-another.mobile.html.erb +14 -0
  26. data/spec/dummy/app/views/pages/_partial.html.erb +1 -0
  27. data/spec/dummy/app/views/pages/_partial.mobile.html.erb +1 -0
  28. data/spec/dummy/app/views/pages/action_view.html.erb +1 -0
  29. data/spec/dummy/app/views/pages/action_view.mobile.html.erb +1 -0
  30. data/spec/dummy/app/views/pages/conditional.html.erb +5 -0
  31. data/spec/dummy/app/views/pages/default.html.erb +1 -0
  32. data/spec/dummy/app/views/pages/layout_template.html.erb +1 -0
  33. data/spec/dummy/app/views/pages/partial_view.html.erb +3 -0
  34. data/spec/dummy/config/application.rb +65 -0
  35. data/spec/dummy/config/boot.rb +10 -0
  36. data/spec/dummy/config/environment.rb +5 -0
  37. data/spec/dummy/config/environments/development.rb +31 -0
  38. data/spec/dummy/config/environments/production.rb +64 -0
  39. data/spec/dummy/config/environments/test.rb +35 -0
  40. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  41. data/spec/dummy/config/initializers/inflections.rb +15 -0
  42. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  43. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  44. data/spec/dummy/config/initializers/session_store.rb +8 -0
  45. data/spec/dummy/config/initializers/wrap_parameters.rb +10 -0
  46. data/spec/dummy/config/locales/en.yml +5 -0
  47. data/spec/dummy/config/routes.rb +64 -0
  48. data/spec/dummy/config.ru +4 -0
  49. data/spec/dummy/lib/assets/.gitkeep +0 -0
  50. data/spec/dummy/log/.gitkeep +0 -0
  51. data/spec/dummy/public/404.html +26 -0
  52. data/spec/dummy/public/422.html +26 -0
  53. data/spec/dummy/public/500.html +25 -0
  54. data/spec/dummy/public/favicon.ico +0 -0
  55. data/spec/dummy/script/rails +6 -0
  56. data/spec/features/mobile_view_spec.rb +93 -0
  57. data/spec/spec_helper.rb +43 -0
  58. metadata +216 -0
@@ -0,0 +1,43 @@
1
+ # This file is copied to spec/ when you run 'rails generate rspec:install'
2
+ ENV["RAILS_ENV"] ||= 'test'
3
+ require File.expand_path("../dummy/config/environment", __FILE__)
4
+ require 'rspec/rails'
5
+ require 'rspec/autorun'
6
+
7
+ require 'capybara/rails'
8
+ require 'capybara/rspec'
9
+
10
+ Capybara.app = Dummy::Application
11
+
12
+ # Requires supporting ruby files with custom matchers and macros, etc,
13
+ # in spec/support/ and its subdirectories.
14
+ Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
15
+
16
+ RSpec.configure do |config|
17
+ # ## Mock Framework
18
+ #
19
+ # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
20
+ #
21
+ # config.mock_with :mocha
22
+ # config.mock_with :flexmock
23
+ # config.mock_with :rr
24
+
25
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
26
+ # config.fixture_path = "#{::Rails.root}/spec/fixtures"
27
+
28
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
29
+ # examples within a transaction, remove the following line or assign false
30
+ # instead of true.
31
+ # config.use_transactional_fixtures = true
32
+
33
+ # If true, the base class of anonymous controllers will be inferred
34
+ # automatically. This will be the default behavior in future versions of
35
+ # rspec-rails.
36
+ config.infer_base_class_for_anonymous_controllers = false
37
+
38
+ # Run specs in random order to surface order dependencies. If you find an
39
+ # order dependency and want to debug it, you can fix the order by providing
40
+ # the seed, which is printed after each run.
41
+ # --seed 1234
42
+ config.order = "random"
43
+ end
metadata ADDED
@@ -0,0 +1,216 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mobile_view
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Yu-Cheng Chuang
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-12-22 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 3.2.0
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 3.2.0
30
+ - !ruby/object:Gem::Dependency
31
+ name: rack-mobile-detect
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: 0.4.0
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 0.4.0
46
+ - !ruby/object:Gem::Dependency
47
+ name: rspec-rails
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: capybara
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ description: Easily specify mobile view template for mobile devices.
79
+ email:
80
+ - ducksteven@gmail.com
81
+ executables: []
82
+ extensions: []
83
+ extra_rdoc_files: []
84
+ files:
85
+ - .gitignore
86
+ - .rspec
87
+ - Gemfile
88
+ - Gemfile.lock
89
+ - README.markdown
90
+ - Rakefile
91
+ - lib/mobile_view.rb
92
+ - lib/mobile_view/controller_helper.rb
93
+ - lib/mobile_view/engine.rb
94
+ - lib/mobile_view/resolver.rb
95
+ - lib/mobile_view/version.rb
96
+ - lib/tasks/mobile_view_tasks.rake
97
+ - mobile_view.gemspec
98
+ - spec/dummy/README.rdoc
99
+ - spec/dummy/Rakefile
100
+ - spec/dummy/app/assets/javascripts/application.js
101
+ - spec/dummy/app/assets/stylesheets/application.css
102
+ - spec/dummy/app/controllers/application_controller.rb
103
+ - spec/dummy/app/controllers/pages_controller.rb
104
+ - spec/dummy/app/helpers/application_helper.rb
105
+ - spec/dummy/app/mailers/.gitkeep
106
+ - spec/dummy/app/models/.gitkeep
107
+ - spec/dummy/app/views/layouts/application.html.erb
108
+ - spec/dummy/app/views/layouts/yet-another.html.erb
109
+ - spec/dummy/app/views/layouts/yet-another.mobile.html.erb
110
+ - spec/dummy/app/views/pages/_partial.html.erb
111
+ - spec/dummy/app/views/pages/_partial.mobile.html.erb
112
+ - spec/dummy/app/views/pages/action_view.html.erb
113
+ - spec/dummy/app/views/pages/action_view.mobile.html.erb
114
+ - spec/dummy/app/views/pages/conditional.html.erb
115
+ - spec/dummy/app/views/pages/default.html.erb
116
+ - spec/dummy/app/views/pages/layout_template.html.erb
117
+ - spec/dummy/app/views/pages/partial_view.html.erb
118
+ - spec/dummy/config.ru
119
+ - spec/dummy/config/application.rb
120
+ - spec/dummy/config/boot.rb
121
+ - spec/dummy/config/environment.rb
122
+ - spec/dummy/config/environments/development.rb
123
+ - spec/dummy/config/environments/production.rb
124
+ - spec/dummy/config/environments/test.rb
125
+ - spec/dummy/config/initializers/backtrace_silencers.rb
126
+ - spec/dummy/config/initializers/inflections.rb
127
+ - spec/dummy/config/initializers/mime_types.rb
128
+ - spec/dummy/config/initializers/secret_token.rb
129
+ - spec/dummy/config/initializers/session_store.rb
130
+ - spec/dummy/config/initializers/wrap_parameters.rb
131
+ - spec/dummy/config/locales/en.yml
132
+ - spec/dummy/config/routes.rb
133
+ - spec/dummy/lib/assets/.gitkeep
134
+ - spec/dummy/log/.gitkeep
135
+ - spec/dummy/public/404.html
136
+ - spec/dummy/public/422.html
137
+ - spec/dummy/public/500.html
138
+ - spec/dummy/public/favicon.ico
139
+ - spec/dummy/script/rails
140
+ - spec/features/mobile_view_spec.rb
141
+ - spec/spec_helper.rb
142
+ homepage: https://github.com/chitsaou/mobile_view
143
+ licenses: []
144
+ post_install_message:
145
+ rdoc_options: []
146
+ require_paths:
147
+ - lib
148
+ required_ruby_version: !ruby/object:Gem::Requirement
149
+ none: false
150
+ requirements:
151
+ - - ! '>='
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ segments:
155
+ - 0
156
+ hash: -1475394104596427624
157
+ required_rubygems_version: !ruby/object:Gem::Requirement
158
+ none: false
159
+ requirements:
160
+ - - ! '>='
161
+ - !ruby/object:Gem::Version
162
+ version: '0'
163
+ segments:
164
+ - 0
165
+ hash: -1475394104596427624
166
+ requirements: []
167
+ rubyforge_project:
168
+ rubygems_version: 1.8.24
169
+ signing_key:
170
+ specification_version: 3
171
+ summary: View template for mobile devices made easy.
172
+ test_files:
173
+ - spec/dummy/README.rdoc
174
+ - spec/dummy/Rakefile
175
+ - spec/dummy/app/assets/javascripts/application.js
176
+ - spec/dummy/app/assets/stylesheets/application.css
177
+ - spec/dummy/app/controllers/application_controller.rb
178
+ - spec/dummy/app/controllers/pages_controller.rb
179
+ - spec/dummy/app/helpers/application_helper.rb
180
+ - spec/dummy/app/mailers/.gitkeep
181
+ - spec/dummy/app/models/.gitkeep
182
+ - spec/dummy/app/views/layouts/application.html.erb
183
+ - spec/dummy/app/views/layouts/yet-another.html.erb
184
+ - spec/dummy/app/views/layouts/yet-another.mobile.html.erb
185
+ - spec/dummy/app/views/pages/_partial.html.erb
186
+ - spec/dummy/app/views/pages/_partial.mobile.html.erb
187
+ - spec/dummy/app/views/pages/action_view.html.erb
188
+ - spec/dummy/app/views/pages/action_view.mobile.html.erb
189
+ - spec/dummy/app/views/pages/conditional.html.erb
190
+ - spec/dummy/app/views/pages/default.html.erb
191
+ - spec/dummy/app/views/pages/layout_template.html.erb
192
+ - spec/dummy/app/views/pages/partial_view.html.erb
193
+ - spec/dummy/config.ru
194
+ - spec/dummy/config/application.rb
195
+ - spec/dummy/config/boot.rb
196
+ - spec/dummy/config/environment.rb
197
+ - spec/dummy/config/environments/development.rb
198
+ - spec/dummy/config/environments/production.rb
199
+ - spec/dummy/config/environments/test.rb
200
+ - spec/dummy/config/initializers/backtrace_silencers.rb
201
+ - spec/dummy/config/initializers/inflections.rb
202
+ - spec/dummy/config/initializers/mime_types.rb
203
+ - spec/dummy/config/initializers/secret_token.rb
204
+ - spec/dummy/config/initializers/session_store.rb
205
+ - spec/dummy/config/initializers/wrap_parameters.rb
206
+ - spec/dummy/config/locales/en.yml
207
+ - spec/dummy/config/routes.rb
208
+ - spec/dummy/lib/assets/.gitkeep
209
+ - spec/dummy/log/.gitkeep
210
+ - spec/dummy/public/404.html
211
+ - spec/dummy/public/422.html
212
+ - spec/dummy/public/500.html
213
+ - spec/dummy/public/favicon.ico
214
+ - spec/dummy/script/rails
215
+ - spec/features/mobile_view_spec.rb
216
+ - spec/spec_helper.rb