dorsale 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +31 -0
  5. data/app/assets/javascripts/dorsale/addresses.js +2 -0
  6. data/app/assets/javascripts/dorsale/application.js +13 -0
  7. data/app/assets/stylesheets/dorsale/addresses.css +4 -0
  8. data/app/assets/stylesheets/dorsale/application.css +13 -0
  9. data/app/assets/stylesheets/scaffold.css +56 -0
  10. data/app/controllers/dorsale/addresses_controller.rb +62 -0
  11. data/app/controllers/dorsale/application_controller.rb +4 -0
  12. data/app/helpers/dorsale/addresses_helper.rb +4 -0
  13. data/app/helpers/dorsale/application_helper.rb +4 -0
  14. data/app/models/dorsale/address.rb +10 -0
  15. data/app/views/dorsale/addresses/_form.html.slim +24 -0
  16. data/app/views/dorsale/addresses/edit.html.slim +8 -0
  17. data/app/views/dorsale/addresses/index.html.slim +29 -0
  18. data/app/views/dorsale/addresses/new.html.slim +5 -0
  19. data/app/views/dorsale/addresses/show.html.slim +21 -0
  20. data/config/routes.rb +4 -0
  21. data/db/migrate/20141010140200_create_dorsale_addresses.rb +13 -0
  22. data/db/migrate/20141014072756_add_polymorphic_fields_to_addresses.rb +6 -0
  23. data/lib/dorsale.rb +4 -0
  24. data/lib/dorsale/engine.rb +12 -0
  25. data/lib/dorsale/version.rb +3 -0
  26. data/lib/tasks/dorsale_tasks.rake +4 -0
  27. data/spec/controllers/dorsale/addresses_controller_spec.rb +162 -0
  28. data/spec/dummy/README.rdoc +28 -0
  29. data/spec/dummy/Rakefile +6 -0
  30. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  31. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  32. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  33. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  34. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  35. data/spec/dummy/bin/bundle +3 -0
  36. data/spec/dummy/bin/rails +4 -0
  37. data/spec/dummy/bin/rake +4 -0
  38. data/spec/dummy/config.ru +4 -0
  39. data/spec/dummy/config/application.rb +28 -0
  40. data/spec/dummy/config/boot.rb +5 -0
  41. data/spec/dummy/config/database.yml +25 -0
  42. data/spec/dummy/config/environment.rb +5 -0
  43. data/spec/dummy/config/environments/development.rb +32 -0
  44. data/spec/dummy/config/environments/production.rb +80 -0
  45. data/spec/dummy/config/environments/test.rb +39 -0
  46. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  47. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  48. data/spec/dummy/config/initializers/inflections.rb +16 -0
  49. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  50. data/spec/dummy/config/initializers/secret_token.rb +12 -0
  51. data/spec/dummy/config/initializers/session_store.rb +3 -0
  52. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  53. data/spec/dummy/config/locales/en.yml +23 -0
  54. data/spec/dummy/config/routes.rb +4 -0
  55. data/spec/dummy/db/development.sqlite3 +0 -0
  56. data/spec/dummy/db/schema.rb +28 -0
  57. data/spec/dummy/db/test.sqlite3 +0 -0
  58. data/spec/dummy/log/development.log +27 -0
  59. data/spec/dummy/log/test.log +2937 -0
  60. data/spec/dummy/public/404.html +58 -0
  61. data/spec/dummy/public/422.html +58 -0
  62. data/spec/dummy/public/500.html +57 -0
  63. data/spec/dummy/public/favicon.ico +0 -0
  64. data/spec/factories/dorsale_addresses.rb +11 -0
  65. data/spec/helpers/dorsale/addresses_helper_spec.rb +16 -0
  66. data/spec/models/dorsale/address_spec.rb +36 -0
  67. data/spec/rails_helper.rb +58 -0
  68. data/spec/routing/dorsale/addresses_routing_spec.rb +38 -0
  69. data/spec/spec_helper.rb +86 -0
  70. data/spec/views/dorsale/addresses/edit.html.slim_spec.rb +32 -0
  71. data/spec/views/dorsale/addresses/index.html.slim_spec.rb +32 -0
  72. data/spec/views/dorsale/addresses/new.html.slim_spec.rb +32 -0
  73. data/spec/views/dorsale/addresses/show.html.slim_spec.rb +24 -0
  74. metadata +260 -0
@@ -0,0 +1,32 @@
1
+ require 'rails_helper'
2
+ module Dorsale
3
+ RSpec.describe "dorsale/addresses/index", :type => :view do
4
+ before(:each) do
5
+ assign(:addresses, [
6
+ Address.create!(
7
+ :street => "Street",
8
+ :street_bis => "Street Bis",
9
+ :city => "City",
10
+ :zip => "Zip",
11
+ :country => "Country"
12
+ ),
13
+ Address.create!(
14
+ :street => "Street",
15
+ :street_bis => "Street Bis",
16
+ :city => "City",
17
+ :zip => "Zip",
18
+ :country => "Country"
19
+ )
20
+ ])
21
+ end
22
+
23
+ it "renders a list of addresses" do
24
+ render
25
+ assert_select "tr>td", :text => "Street".to_s, :count => 2
26
+ assert_select "tr>td", :text => "Street Bis".to_s, :count => 2
27
+ assert_select "tr>td", :text => "City".to_s, :count => 2
28
+ assert_select "tr>td", :text => "Zip".to_s, :count => 2
29
+ assert_select "tr>td", :text => "Country".to_s, :count => 2
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ require 'rails_helper'
2
+
3
+ module Dorsale
4
+ RSpec.describe "dorsale/addresses/new", :type => :view do
5
+ before(:each) do
6
+ assign(:address, Address.new(
7
+ :street => "MyString",
8
+ :street_bis => "MyString",
9
+ :city => "MyString",
10
+ :zip => "MyString",
11
+ :country => "MyString"
12
+ ))
13
+ end
14
+
15
+ it "renders new address form" do
16
+ render
17
+
18
+ assert_select "form[action=?][method=?]", dorsale.addresses_path, "post" do
19
+
20
+ assert_select "input#address_street[name=?]", "address[street]"
21
+
22
+ assert_select "input#address_street_bis[name=?]", "address[street_bis]"
23
+
24
+ assert_select "input#address_city[name=?]", "address[city]"
25
+
26
+ assert_select "input#address_zip[name=?]", "address[zip]"
27
+
28
+ assert_select "input#address_country[name=?]", "address[country]"
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,24 @@
1
+ require 'rails_helper'
2
+
3
+ module Dorsale
4
+ RSpec.describe "dorsale/addresses/show", :type => :view do
5
+ before(:each) do
6
+ @address = assign(:address, Address.create!(
7
+ :street => "Street",
8
+ :street_bis => "Street Bis",
9
+ :city => "City",
10
+ :zip => "Zip",
11
+ :country => "Country"
12
+ ))
13
+ end
14
+
15
+ it "renders attributes in <p>" do
16
+ render
17
+ expect(rendered).to match(/Street/)
18
+ expect(rendered).to match(/Street Bis/)
19
+ expect(rendered).to match(/City/)
20
+ expect(rendered).to match(/Zip/)
21
+ expect(rendered).to match(/Country/)
22
+ end
23
+ end
24
+ end
metadata ADDED
@@ -0,0 +1,260 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dorsale
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - AGILiDEE
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-10-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: 4.0.10
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: 4.0.10
27
+ - !ruby/object:Gem::Dependency
28
+ name: slim
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: sqlite3
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec-rails
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: slim-rails
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: capybara
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: factory_girl_rails
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ description: Run your own business.
112
+ email:
113
+ - contact@agilidee.com
114
+ executables: []
115
+ extensions: []
116
+ extra_rdoc_files: []
117
+ files:
118
+ - app/assets/javascripts/dorsale/addresses.js
119
+ - app/assets/javascripts/dorsale/application.js
120
+ - app/assets/stylesheets/dorsale/addresses.css
121
+ - app/assets/stylesheets/dorsale/application.css
122
+ - app/assets/stylesheets/scaffold.css
123
+ - app/controllers/dorsale/addresses_controller.rb
124
+ - app/controllers/dorsale/application_controller.rb
125
+ - app/helpers/dorsale/addresses_helper.rb
126
+ - app/helpers/dorsale/application_helper.rb
127
+ - app/models/dorsale/address.rb
128
+ - app/views/dorsale/addresses/_form.html.slim
129
+ - app/views/dorsale/addresses/edit.html.slim
130
+ - app/views/dorsale/addresses/index.html.slim
131
+ - app/views/dorsale/addresses/new.html.slim
132
+ - app/views/dorsale/addresses/show.html.slim
133
+ - config/routes.rb
134
+ - db/migrate/20141010140200_create_dorsale_addresses.rb
135
+ - db/migrate/20141014072756_add_polymorphic_fields_to_addresses.rb
136
+ - lib/dorsale/engine.rb
137
+ - lib/dorsale/version.rb
138
+ - lib/dorsale.rb
139
+ - lib/tasks/dorsale_tasks.rake
140
+ - MIT-LICENSE
141
+ - Rakefile
142
+ - README.rdoc
143
+ - spec/controllers/dorsale/addresses_controller_spec.rb
144
+ - spec/dummy/app/assets/javascripts/application.js
145
+ - spec/dummy/app/assets/stylesheets/application.css
146
+ - spec/dummy/app/controllers/application_controller.rb
147
+ - spec/dummy/app/helpers/application_helper.rb
148
+ - spec/dummy/app/views/layouts/application.html.erb
149
+ - spec/dummy/bin/bundle
150
+ - spec/dummy/bin/rails
151
+ - spec/dummy/bin/rake
152
+ - spec/dummy/config/application.rb
153
+ - spec/dummy/config/boot.rb
154
+ - spec/dummy/config/database.yml
155
+ - spec/dummy/config/environment.rb
156
+ - spec/dummy/config/environments/development.rb
157
+ - spec/dummy/config/environments/production.rb
158
+ - spec/dummy/config/environments/test.rb
159
+ - spec/dummy/config/initializers/backtrace_silencers.rb
160
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
161
+ - spec/dummy/config/initializers/inflections.rb
162
+ - spec/dummy/config/initializers/mime_types.rb
163
+ - spec/dummy/config/initializers/secret_token.rb
164
+ - spec/dummy/config/initializers/session_store.rb
165
+ - spec/dummy/config/initializers/wrap_parameters.rb
166
+ - spec/dummy/config/locales/en.yml
167
+ - spec/dummy/config/routes.rb
168
+ - spec/dummy/config.ru
169
+ - spec/dummy/db/development.sqlite3
170
+ - spec/dummy/db/schema.rb
171
+ - spec/dummy/db/test.sqlite3
172
+ - spec/dummy/log/development.log
173
+ - spec/dummy/log/test.log
174
+ - spec/dummy/public/404.html
175
+ - spec/dummy/public/422.html
176
+ - spec/dummy/public/500.html
177
+ - spec/dummy/public/favicon.ico
178
+ - spec/dummy/Rakefile
179
+ - spec/dummy/README.rdoc
180
+ - spec/factories/dorsale_addresses.rb
181
+ - spec/helpers/dorsale/addresses_helper_spec.rb
182
+ - spec/models/dorsale/address_spec.rb
183
+ - spec/rails_helper.rb
184
+ - spec/routing/dorsale/addresses_routing_spec.rb
185
+ - spec/spec_helper.rb
186
+ - spec/views/dorsale/addresses/edit.html.slim_spec.rb
187
+ - spec/views/dorsale/addresses/index.html.slim_spec.rb
188
+ - spec/views/dorsale/addresses/new.html.slim_spec.rb
189
+ - spec/views/dorsale/addresses/show.html.slim_spec.rb
190
+ homepage: https://github.com/AGILiDEE/dorsale
191
+ licenses: []
192
+ metadata: {}
193
+ post_install_message:
194
+ rdoc_options: []
195
+ require_paths:
196
+ - lib
197
+ required_ruby_version: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - '>='
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ required_rubygems_version: !ruby/object:Gem::Requirement
203
+ requirements:
204
+ - - '>='
205
+ - !ruby/object:Gem::Version
206
+ version: '0'
207
+ requirements: []
208
+ rubyforge_project:
209
+ rubygems_version: 2.0.14
210
+ signing_key:
211
+ specification_version: 4
212
+ summary: Modular ERP made with Ruby on Rails
213
+ test_files:
214
+ - spec/controllers/dorsale/addresses_controller_spec.rb
215
+ - spec/dummy/app/assets/javascripts/application.js
216
+ - spec/dummy/app/assets/stylesheets/application.css
217
+ - spec/dummy/app/controllers/application_controller.rb
218
+ - spec/dummy/app/helpers/application_helper.rb
219
+ - spec/dummy/app/views/layouts/application.html.erb
220
+ - spec/dummy/bin/bundle
221
+ - spec/dummy/bin/rails
222
+ - spec/dummy/bin/rake
223
+ - spec/dummy/config/application.rb
224
+ - spec/dummy/config/boot.rb
225
+ - spec/dummy/config/database.yml
226
+ - spec/dummy/config/environment.rb
227
+ - spec/dummy/config/environments/development.rb
228
+ - spec/dummy/config/environments/production.rb
229
+ - spec/dummy/config/environments/test.rb
230
+ - spec/dummy/config/initializers/backtrace_silencers.rb
231
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
232
+ - spec/dummy/config/initializers/inflections.rb
233
+ - spec/dummy/config/initializers/mime_types.rb
234
+ - spec/dummy/config/initializers/secret_token.rb
235
+ - spec/dummy/config/initializers/session_store.rb
236
+ - spec/dummy/config/initializers/wrap_parameters.rb
237
+ - spec/dummy/config/locales/en.yml
238
+ - spec/dummy/config/routes.rb
239
+ - spec/dummy/config.ru
240
+ - spec/dummy/db/development.sqlite3
241
+ - spec/dummy/db/schema.rb
242
+ - spec/dummy/db/test.sqlite3
243
+ - spec/dummy/log/development.log
244
+ - spec/dummy/log/test.log
245
+ - spec/dummy/public/404.html
246
+ - spec/dummy/public/422.html
247
+ - spec/dummy/public/500.html
248
+ - spec/dummy/public/favicon.ico
249
+ - spec/dummy/Rakefile
250
+ - spec/dummy/README.rdoc
251
+ - spec/factories/dorsale_addresses.rb
252
+ - spec/helpers/dorsale/addresses_helper_spec.rb
253
+ - spec/models/dorsale/address_spec.rb
254
+ - spec/rails_helper.rb
255
+ - spec/routing/dorsale/addresses_routing_spec.rb
256
+ - spec/spec_helper.rb
257
+ - spec/views/dorsale/addresses/edit.html.slim_spec.rb
258
+ - spec/views/dorsale/addresses/index.html.slim_spec.rb
259
+ - spec/views/dorsale/addresses/new.html.slim_spec.rb
260
+ - spec/views/dorsale/addresses/show.html.slim_spec.rb