rda 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/.gitignore +9 -0
  2. data/.rspec +2 -0
  3. data/Gemfile +17 -0
  4. data/Gemfile.lock +137 -0
  5. data/Guardfile +12 -0
  6. data/MIT-LICENSE +20 -0
  7. data/README.textile +113 -0
  8. data/Rakefile +26 -0
  9. data/lib/rda/app.rb +11 -0
  10. data/lib/rda/nginx.rb +101 -0
  11. data/lib/rda/rails.rb +7 -0
  12. data/lib/rda/railtie.rb +9 -0
  13. data/lib/rda/rvm.rb +48 -0
  14. data/lib/rda/templates/nginx +6 -0
  15. data/lib/rda/templates/rvmrc +5 -0
  16. data/lib/rda/version.rb +3 -0
  17. data/lib/rda.rb +23 -0
  18. data/lib/tasks/rda_tasks.rake +38 -0
  19. data/rda.gemspec +34 -0
  20. data/rvmrc.example +1 -0
  21. data/spec/dummy/Rakefile +7 -0
  22. data/spec/dummy/app/assets/javascripts/application.js +7 -0
  23. data/spec/dummy/app/assets/stylesheets/application.css +7 -0
  24. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  25. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  26. data/spec/dummy/app/mailers/.gitkeep +0 -0
  27. data/spec/dummy/app/models/.gitkeep +0 -0
  28. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  29. data/spec/dummy/config/application.rb +51 -0
  30. data/spec/dummy/config/boot.rb +10 -0
  31. data/spec/dummy/config/environment.rb +5 -0
  32. data/spec/dummy/config/environments/development.rb +30 -0
  33. data/spec/dummy/config/environments/production.rb +60 -0
  34. data/spec/dummy/config/environments/test.rb +39 -0
  35. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  36. data/spec/dummy/config/initializers/inflections.rb +10 -0
  37. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  38. data/spec/dummy/config/initializers/rda.rb +3 -0
  39. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  40. data/spec/dummy/config/initializers/session_store.rb +8 -0
  41. data/spec/dummy/config/initializers/wrap_parameters.rb +10 -0
  42. data/spec/dummy/config/locales/en.yml +5 -0
  43. data/spec/dummy/config/routes.rb +58 -0
  44. data/spec/dummy/config.ru +4 -0
  45. data/spec/dummy/lib/assets/.gitkeep +0 -0
  46. data/spec/dummy/log/.gitkeep +0 -0
  47. data/spec/dummy/public/404.html +26 -0
  48. data/spec/dummy/public/422.html +26 -0
  49. data/spec/dummy/public/500.html +26 -0
  50. data/spec/dummy/public/favicon.ico +0 -0
  51. data/spec/dummy/script/rails +6 -0
  52. data/spec/fixtures/nginx.conf +2 -0
  53. data/spec/lib/rda/app_spec.rb +13 -0
  54. data/spec/lib/rda/nginx_spec.rb +124 -0
  55. data/spec/lib/rda/rails_spec.rb +7 -0
  56. data/spec/lib/rda/rvm_spec.rb +55 -0
  57. data/spec/lib/rda_spec.rb +20 -0
  58. data/spec/spec_helper.rb +30 -0
  59. metadata +247 -0
@@ -0,0 +1,20 @@
1
+ require 'spec_helper'
2
+
3
+ describe Rda do
4
+ describe '.config' do
5
+ subject { Rda.config }
6
+
7
+ it { should be_a(Confstruct::Configuration) }
8
+ end
9
+
10
+ describe '.configure' do
11
+ it 'sets the config paths of nginx' do
12
+ Rda.configure do
13
+ nginx_conf_paths ['/tmp/rda/nginx/conf']
14
+ end
15
+
16
+ Rda.config.nginx_conf_paths.should have(1).item
17
+ Rda.config.nginx_conf_paths.should include('/tmp/rda/nginx/conf')
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,30 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # Require this file using `require "spec_helper.rb"` to ensure that it is only
4
+ # loaded once.
5
+ #
6
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
7
+
8
+ require 'dummy/config/environment'
9
+
10
+ require 'rda'
11
+ require 'pry'
12
+
13
+ RSpec.configure do |config|
14
+ config.treat_symbols_as_metadata_keys_with_true_values = true
15
+ config.run_all_when_everything_filtered = true
16
+ config.filter_run :focus
17
+
18
+ def capture(stream)
19
+ begin
20
+ stream = stream.to_s
21
+ eval "$#{stream} = StringIO.new"
22
+ yield
23
+ result = eval("$#{stream}").string
24
+ ensure
25
+ eval("$#{stream} = #{stream.upcase}")
26
+ end
27
+
28
+ result
29
+ end
30
+ end
metadata ADDED
@@ -0,0 +1,247 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rda
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Tower He
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-01-19 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: &70359970346280 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 3.1.3
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70359970346280
25
+ - !ruby/object:Gem::Dependency
26
+ name: thor
27
+ requirement: &70359970345600 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *70359970345600
36
+ - !ruby/object:Gem::Dependency
37
+ name: confstruct
38
+ requirement: &70359970344560 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *70359970344560
47
+ - !ruby/object:Gem::Dependency
48
+ name: pry
49
+ requirement: &70359970343580 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: *70359970343580
58
+ - !ruby/object:Gem::Dependency
59
+ name: rspec
60
+ requirement: &70359970326360 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ type: :development
67
+ prerelease: false
68
+ version_requirements: *70359970326360
69
+ - !ruby/object:Gem::Dependency
70
+ name: guard
71
+ requirement: &70359970324740 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: *70359970324740
80
+ - !ruby/object:Gem::Dependency
81
+ name: guard-bundler
82
+ requirement: &70359970323680 !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ type: :development
89
+ prerelease: false
90
+ version_requirements: *70359970323680
91
+ - !ruby/object:Gem::Dependency
92
+ name: guard-rspec
93
+ requirement: &70359970322740 !ruby/object:Gem::Requirement
94
+ none: false
95
+ requirements:
96
+ - - ! '>='
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ type: :development
100
+ prerelease: false
101
+ version_requirements: *70359970322740
102
+ - !ruby/object:Gem::Dependency
103
+ name: ruby_gntp
104
+ requirement: &70359970321460 !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: *70359970321460
113
+ description: Rda(Rails Development Assist) is combined with lots of useful rake tasks
114
+ which can help you to setup your development enviroments and tools more quickly.
115
+ email:
116
+ - towerhe@gmail.com
117
+ executables: []
118
+ extensions: []
119
+ extra_rdoc_files: []
120
+ files:
121
+ - .gitignore
122
+ - .rspec
123
+ - Gemfile
124
+ - Gemfile.lock
125
+ - Guardfile
126
+ - MIT-LICENSE
127
+ - README.textile
128
+ - Rakefile
129
+ - lib/rda.rb
130
+ - lib/rda/app.rb
131
+ - lib/rda/nginx.rb
132
+ - lib/rda/rails.rb
133
+ - lib/rda/railtie.rb
134
+ - lib/rda/rvm.rb
135
+ - lib/rda/templates/nginx
136
+ - lib/rda/templates/rvmrc
137
+ - lib/rda/version.rb
138
+ - lib/tasks/rda_tasks.rake
139
+ - rda.gemspec
140
+ - rvmrc.example
141
+ - spec/dummy/Rakefile
142
+ - spec/dummy/app/assets/javascripts/application.js
143
+ - spec/dummy/app/assets/stylesheets/application.css
144
+ - spec/dummy/app/controllers/application_controller.rb
145
+ - spec/dummy/app/helpers/application_helper.rb
146
+ - spec/dummy/app/mailers/.gitkeep
147
+ - spec/dummy/app/models/.gitkeep
148
+ - spec/dummy/app/views/layouts/application.html.erb
149
+ - spec/dummy/config.ru
150
+ - spec/dummy/config/application.rb
151
+ - spec/dummy/config/boot.rb
152
+ - spec/dummy/config/environment.rb
153
+ - spec/dummy/config/environments/development.rb
154
+ - spec/dummy/config/environments/production.rb
155
+ - spec/dummy/config/environments/test.rb
156
+ - spec/dummy/config/initializers/backtrace_silencers.rb
157
+ - spec/dummy/config/initializers/inflections.rb
158
+ - spec/dummy/config/initializers/mime_types.rb
159
+ - spec/dummy/config/initializers/rda.rb
160
+ - spec/dummy/config/initializers/secret_token.rb
161
+ - spec/dummy/config/initializers/session_store.rb
162
+ - spec/dummy/config/initializers/wrap_parameters.rb
163
+ - spec/dummy/config/locales/en.yml
164
+ - spec/dummy/config/routes.rb
165
+ - spec/dummy/lib/assets/.gitkeep
166
+ - spec/dummy/log/.gitkeep
167
+ - spec/dummy/public/404.html
168
+ - spec/dummy/public/422.html
169
+ - spec/dummy/public/500.html
170
+ - spec/dummy/public/favicon.ico
171
+ - spec/dummy/script/rails
172
+ - spec/fixtures/nginx.conf
173
+ - spec/lib/rda/app_spec.rb
174
+ - spec/lib/rda/nginx_spec.rb
175
+ - spec/lib/rda/rails_spec.rb
176
+ - spec/lib/rda/rvm_spec.rb
177
+ - spec/lib/rda_spec.rb
178
+ - spec/spec_helper.rb
179
+ homepage: https://github.com/towerhe/rda
180
+ licenses: []
181
+ post_install_message:
182
+ rdoc_options: []
183
+ require_paths:
184
+ - lib
185
+ required_ruby_version: !ruby/object:Gem::Requirement
186
+ none: false
187
+ requirements:
188
+ - - ! '>='
189
+ - !ruby/object:Gem::Version
190
+ version: '0'
191
+ segments:
192
+ - 0
193
+ hash: -2929130629606210235
194
+ required_rubygems_version: !ruby/object:Gem::Requirement
195
+ none: false
196
+ requirements:
197
+ - - ! '>='
198
+ - !ruby/object:Gem::Version
199
+ version: '0'
200
+ segments:
201
+ - 0
202
+ hash: -2929130629606210235
203
+ requirements: []
204
+ rubyforge_project:
205
+ rubygems_version: 1.8.10
206
+ signing_key:
207
+ specification_version: 3
208
+ summary: Rails Development Assist
209
+ test_files:
210
+ - spec/dummy/Rakefile
211
+ - spec/dummy/app/assets/javascripts/application.js
212
+ - spec/dummy/app/assets/stylesheets/application.css
213
+ - spec/dummy/app/controllers/application_controller.rb
214
+ - spec/dummy/app/helpers/application_helper.rb
215
+ - spec/dummy/app/mailers/.gitkeep
216
+ - spec/dummy/app/models/.gitkeep
217
+ - spec/dummy/app/views/layouts/application.html.erb
218
+ - spec/dummy/config.ru
219
+ - spec/dummy/config/application.rb
220
+ - spec/dummy/config/boot.rb
221
+ - spec/dummy/config/environment.rb
222
+ - spec/dummy/config/environments/development.rb
223
+ - spec/dummy/config/environments/production.rb
224
+ - spec/dummy/config/environments/test.rb
225
+ - spec/dummy/config/initializers/backtrace_silencers.rb
226
+ - spec/dummy/config/initializers/inflections.rb
227
+ - spec/dummy/config/initializers/mime_types.rb
228
+ - spec/dummy/config/initializers/rda.rb
229
+ - spec/dummy/config/initializers/secret_token.rb
230
+ - spec/dummy/config/initializers/session_store.rb
231
+ - spec/dummy/config/initializers/wrap_parameters.rb
232
+ - spec/dummy/config/locales/en.yml
233
+ - spec/dummy/config/routes.rb
234
+ - spec/dummy/lib/assets/.gitkeep
235
+ - spec/dummy/log/.gitkeep
236
+ - spec/dummy/public/404.html
237
+ - spec/dummy/public/422.html
238
+ - spec/dummy/public/500.html
239
+ - spec/dummy/public/favicon.ico
240
+ - spec/dummy/script/rails
241
+ - spec/fixtures/nginx.conf
242
+ - spec/lib/rda/app_spec.rb
243
+ - spec/lib/rda/nginx_spec.rb
244
+ - spec/lib/rda/rails_spec.rb
245
+ - spec/lib/rda/rvm_spec.rb
246
+ - spec/lib/rda_spec.rb
247
+ - spec/spec_helper.rb