ecm_courses 0.0.4.pre → 0.0.5.pre

Sign up to get free protection for your applications and to get access to all the features.
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2012 YOURNAME
1
+ Copyright 2012 Roberto Vasquez Angel
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -1,16 +1,17 @@
1
1
  class Ecm::Courses::CourseCategoriesController < ApplicationController
2
2
  def index
3
- @course_categories = Ecm::Courses::CourseCategory.all
3
+ @course_categories = ::Ecm::Courses::CourseCategory.all
4
4
  end
5
-
5
+
6
6
  def show
7
7
  @year = params[:year] ||= Time.zone.now.year
8
8
  @month = params[:month] ||= Time.zone.now.month
9
9
 
10
10
  @date = Date.strptime("#{@month}-#{@year}", "%m-%Y")
11
-
12
- @course_category = Ecm::Courses::CourseCategory.includes(:ecm_courses_courses => [ :ecm_courses_course_dates ]).find(params[:id])
11
+
12
+ @course_category = ::Ecm::Courses::CourseCategory.includes(:ecm_courses_courses => [ :ecm_courses_course_dates ]).find(params[:id])
13
13
  @courses = @course_category.ecm_courses_courses.all
14
- @course_dates = @courses.reduce([]) { |cd, c| cd << c.ecm_courses_course_dates.for_month(@date).all }.flatten
14
+ @course_dates = @courses.reduce([]) { |cd, c| cd << c.ecm_courses_course_dates.for_month(@date).all }.flatten
15
15
  end
16
16
  end
17
+
@@ -6,7 +6,7 @@
6
6
  <% end %>
7
7
 
8
8
  <div class="course_categories-tree">
9
- <%= nested_li(course_category.descendants, {}) do |course_category| %>
9
+ <%= nested_li(course_category.descendants, {}) do |course_category, level| %>
10
10
  <%= link_to course_category.tree_name, course_category %>
11
11
  <% end %>
12
12
  </div>
@@ -1,4 +1,7 @@
1
1
  de:
2
+ date:
3
+ formats:
4
+ month_with_year: %B %Y
2
5
  ecm:
3
6
  courses:
4
7
  active_admin:
@@ -11,4 +14,5 @@ de:
11
14
  back_to_index: "Zurück zur Übersicht"
12
15
  messages:
13
16
  not_found: "Kurs Kategorie \"%{name}\" nicht gefunden."
14
- no_courses_available: "Keine Kurse in dieser Kategorie vorhanden."
17
+ no_courses_available: "Keine Kurse in dieser Kategorie vorhanden."
18
+
@@ -1,4 +1,7 @@
1
1
  en:
2
+ date:
3
+ formats:
4
+ month_with_year: %B %Y
2
5
  ecm:
3
6
  courses:
4
7
  active_admin:
@@ -11,4 +14,4 @@ en:
11
14
  back_to_index: "Back to the index"
12
15
  messages:
13
16
  not_found: "Course category \"%{name}\" not found."
14
- no_courses_available: "There are now courses in this category."
17
+ no_courses_available: "There are now courses in this category."
@@ -1,15 +1,13 @@
1
1
  module Ecm
2
2
  module Courses
3
- class Engine < Rails::Engine
3
+ class Engine < ::Rails::Engine
4
4
  # active admin
5
- initializer :ecm_courses_engine do
6
- ActiveAdmin.setup do |active_admin_config|
7
- active_admin_config.load_paths += Dir[File.dirname(__FILE__) + '/../../../app/admin']
5
+ initializer :ecm_links_engine do
6
+ ::ActiveAdmin.setup do |active_admin_config|
7
+ active_admin_config.load_paths += Dir[File.dirname(__FILE__) + '/active_admin']
8
8
  end
9
- end
10
-
11
- # locales
12
- paths["config/locales"] << File.dirname(__FILE__) + '/../../../config/locales'
9
+ end if defined?(::ActiveAdmin)
13
10
  end
14
11
  end
15
- end
12
+ end
13
+
@@ -1,5 +1,5 @@
1
1
  module Ecm
2
2
  module Courses
3
- VERSION = "0.0.4.pre"
3
+ VERSION = "0.0.5.pre"
4
4
  end
5
5
  end
data/lib/ecm_courses.rb CHANGED
@@ -1,17 +1,10 @@
1
- require 'rubygems'
2
-
3
- require 'rails_tools-absence_validator'
1
+ require 'active_admin-acts_as_list'
4
2
  require 'acts_as_list'
5
3
  require 'awesome_nested_set'
6
4
  require 'awesome_nested_set-tools'
5
+ require 'ecm_calendar_helper'
7
6
  require 'friendly_id'
8
-
9
- require 'active_admin-acts_as_list'
10
-
11
- # Ecm::Admin should do this!
12
- require 'activeadmin'
13
- require 'sass-rails'
14
- require 'meta_search'
7
+ require 'rails_tools-absence_validator'
15
8
 
16
9
  require 'ecm/courses/engine'
17
10
  require 'ecm/courses/configuration'
@@ -22,3 +15,4 @@ module Ecm
22
15
  extend Configuration
23
16
  end
24
17
  end
18
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecm_courses
3
3
  version: !ruby/object:Gem::Version
4
- hash: 961915988
4
+ hash: 961915984
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
9
+ - 5
10
10
  - pre
11
- version: 0.0.4.pre
11
+ version: 0.0.5.pre
12
12
  platform: ruby
13
13
  authors:
14
14
  - Roberto Vasquez Angel
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2012-09-20 00:00:00 Z
19
+ date: 2012-09-22 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: rails
@@ -50,26 +50,10 @@ dependencies:
50
50
  version: 0.1.6
51
51
  type: :runtime
52
52
  version_requirements: *id002
53
- - !ruby/object:Gem::Dependency
54
- name: activeadmin
55
- prerelease: false
56
- requirement: &id003 !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ~>
60
- - !ruby/object:Gem::Version
61
- hash: 11
62
- segments:
63
- - 0
64
- - 5
65
- - 0
66
- version: 0.5.0
67
- type: :runtime
68
- version_requirements: *id003
69
53
  - !ruby/object:Gem::Dependency
70
54
  name: active_admin-acts_as_list
71
55
  prerelease: false
72
- requirement: &id004 !ruby/object:Gem::Requirement
56
+ requirement: &id003 !ruby/object:Gem::Requirement
73
57
  none: false
74
58
  requirements:
75
59
  - - ~>
@@ -81,11 +65,11 @@ dependencies:
81
65
  - 6
82
66
  version: 0.0.6
83
67
  type: :runtime
84
- version_requirements: *id004
68
+ version_requirements: *id003
85
69
  - !ruby/object:Gem::Dependency
86
70
  name: active_admin-awesome_nested_set
87
71
  prerelease: false
88
- requirement: &id005 !ruby/object:Gem::Requirement
72
+ requirement: &id004 !ruby/object:Gem::Requirement
89
73
  none: false
90
74
  requirements:
91
75
  - - ">="
@@ -95,11 +79,11 @@ dependencies:
95
79
  - 0
96
80
  version: "0"
97
81
  type: :runtime
98
- version_requirements: *id005
82
+ version_requirements: *id004
99
83
  - !ruby/object:Gem::Dependency
100
84
  name: awesome_nested_set
101
85
  prerelease: false
102
- requirement: &id006 !ruby/object:Gem::Requirement
86
+ requirement: &id005 !ruby/object:Gem::Requirement
103
87
  none: false
104
88
  requirements:
105
89
  - - ~>
@@ -111,11 +95,11 @@ dependencies:
111
95
  - 3
112
96
  version: 2.1.3
113
97
  type: :runtime
114
- version_requirements: *id006
98
+ version_requirements: *id005
115
99
  - !ruby/object:Gem::Dependency
116
100
  name: awesome_nested_set-tools
117
101
  prerelease: false
118
- requirement: &id007 !ruby/object:Gem::Requirement
102
+ requirement: &id006 !ruby/object:Gem::Requirement
119
103
  none: false
120
104
  requirements:
121
105
  - - ">="
@@ -125,11 +109,11 @@ dependencies:
125
109
  - 0
126
110
  version: "0"
127
111
  type: :runtime
128
- version_requirements: *id007
112
+ version_requirements: *id006
129
113
  - !ruby/object:Gem::Dependency
130
114
  name: ecm_calendar_helper
131
115
  prerelease: false
132
- requirement: &id008 !ruby/object:Gem::Requirement
116
+ requirement: &id007 !ruby/object:Gem::Requirement
133
117
  none: false
134
118
  requirements:
135
119
  - - ~>
@@ -142,11 +126,11 @@ dependencies:
142
126
  - pre
143
127
  version: 0.0.1.pre
144
128
  type: :runtime
145
- version_requirements: *id008
129
+ version_requirements: *id007
146
130
  - !ruby/object:Gem::Dependency
147
131
  name: friendly_id
148
132
  prerelease: false
149
- requirement: &id009 !ruby/object:Gem::Requirement
133
+ requirement: &id008 !ruby/object:Gem::Requirement
150
134
  none: false
151
135
  requirements:
152
136
  - - ~>
@@ -158,11 +142,11 @@ dependencies:
158
142
  - 7
159
143
  version: 4.0.7
160
144
  type: :runtime
161
- version_requirements: *id009
145
+ version_requirements: *id008
162
146
  - !ruby/object:Gem::Dependency
163
147
  name: rails_tools-absence_validator
164
148
  prerelease: false
165
- requirement: &id010 !ruby/object:Gem::Requirement
149
+ requirement: &id009 !ruby/object:Gem::Requirement
166
150
  none: false
167
151
  requirements:
168
152
  - - ~>
@@ -174,10 +158,24 @@ dependencies:
174
158
  - 3
175
159
  version: 0.0.3
176
160
  type: :runtime
177
- version_requirements: *id010
161
+ version_requirements: *id009
178
162
  - !ruby/object:Gem::Dependency
179
163
  name: sqlite3
180
164
  prerelease: false
165
+ requirement: &id010 !ruby/object:Gem::Requirement
166
+ none: false
167
+ requirements:
168
+ - - ">="
169
+ - !ruby/object:Gem::Version
170
+ hash: 3
171
+ segments:
172
+ - 0
173
+ version: "0"
174
+ type: :development
175
+ version_requirements: *id010
176
+ - !ruby/object:Gem::Dependency
177
+ name: thin
178
+ prerelease: false
181
179
  requirement: &id011 !ruby/object:Gem::Requirement
182
180
  none: false
183
181
  requirements:
@@ -190,7 +188,7 @@ dependencies:
190
188
  type: :development
191
189
  version_requirements: *id011
192
190
  - !ruby/object:Gem::Dependency
193
- name: thin
191
+ name: yard
194
192
  prerelease: false
195
193
  requirement: &id012 !ruby/object:Gem::Requirement
196
194
  none: false
@@ -204,7 +202,7 @@ dependencies:
204
202
  type: :development
205
203
  version_requirements: *id012
206
204
  - !ruby/object:Gem::Dependency
207
- name: yard
205
+ name: activeadmin
208
206
  prerelease: false
209
207
  requirement: &id013 !ruby/object:Gem::Requirement
210
208
  none: false
@@ -232,9 +230,37 @@ dependencies:
232
230
  type: :development
233
231
  version_requirements: *id014
234
232
  - !ruby/object:Gem::Dependency
235
- name: meta_search
233
+ name: coffee-rails
236
234
  prerelease: false
237
235
  requirement: &id015 !ruby/object:Gem::Requirement
236
+ none: false
237
+ requirements:
238
+ - - ">="
239
+ - !ruby/object:Gem::Version
240
+ hash: 3
241
+ segments:
242
+ - 0
243
+ version: "0"
244
+ type: :development
245
+ version_requirements: *id015
246
+ - !ruby/object:Gem::Dependency
247
+ name: sass-rails
248
+ prerelease: false
249
+ requirement: &id016 !ruby/object:Gem::Requirement
250
+ none: false
251
+ requirements:
252
+ - - ">="
253
+ - !ruby/object:Gem::Version
254
+ hash: 3
255
+ segments:
256
+ - 0
257
+ version: "0"
258
+ type: :development
259
+ version_requirements: *id016
260
+ - !ruby/object:Gem::Dependency
261
+ name: meta_search
262
+ prerelease: false
263
+ requirement: &id017 !ruby/object:Gem::Requirement
238
264
  none: false
239
265
  requirements:
240
266
  - - ">="
@@ -247,11 +273,11 @@ dependencies:
247
273
  - pre
248
274
  version: 1.1.0.pre
249
275
  type: :development
250
- version_requirements: *id015
276
+ version_requirements: *id017
251
277
  - !ruby/object:Gem::Dependency
252
278
  name: rspec-rails
253
279
  prerelease: false
254
- requirement: &id016 !ruby/object:Gem::Requirement
280
+ requirement: &id018 !ruby/object:Gem::Requirement
255
281
  none: false
256
282
  requirements:
257
283
  - - ~>
@@ -262,11 +288,11 @@ dependencies:
262
288
  - 0
263
289
  version: "2.0"
264
290
  type: :development
265
- version_requirements: *id016
291
+ version_requirements: *id018
266
292
  - !ruby/object:Gem::Dependency
267
293
  name: factory_girl_rails
268
294
  prerelease: false
269
- requirement: &id017 !ruby/object:Gem::Requirement
295
+ requirement: &id019 !ruby/object:Gem::Requirement
270
296
  none: false
271
297
  requirements:
272
298
  - - ~>
@@ -277,11 +303,11 @@ dependencies:
277
303
  - 0
278
304
  version: "1.0"
279
305
  type: :development
280
- version_requirements: *id017
306
+ version_requirements: *id019
281
307
  - !ruby/object:Gem::Dependency
282
308
  name: shoulda-matchers
283
309
  prerelease: false
284
- requirement: &id018 !ruby/object:Gem::Requirement
310
+ requirement: &id020 !ruby/object:Gem::Requirement
285
311
  none: false
286
312
  requirements:
287
313
  - - ">="
@@ -291,11 +317,11 @@ dependencies:
291
317
  - 0
292
318
  version: "0"
293
319
  type: :development
294
- version_requirements: *id018
320
+ version_requirements: *id020
295
321
  - !ruby/object:Gem::Dependency
296
322
  name: capybara
297
323
  prerelease: false
298
- requirement: &id019 !ruby/object:Gem::Requirement
324
+ requirement: &id021 !ruby/object:Gem::Requirement
299
325
  none: false
300
326
  requirements:
301
327
  - - ">="
@@ -305,7 +331,7 @@ dependencies:
305
331
  - 0
306
332
  version: "0"
307
333
  type: :development
308
- version_requirements: *id019
334
+ version_requirements: *id021
309
335
  description: Couse management module for active admin.
310
336
  email:
311
337
  - roberto@vasquez-angel.de
@@ -332,9 +358,6 @@ files:
332
358
  - app/models/ecm/courses/course_category.rb
333
359
  - app/models/ecm/courses/course_date.rb
334
360
  - app/models/ecm/courses/course.rb
335
- - app/admin/ecm_courses_courses.rb
336
- - app/admin/ecm_courses_course_categories.rb
337
- - app/admin/ecm_courses_course_dates.rb
338
361
  - app/assets/images/ecm_courses/course_categories/last_node.png
339
362
  - app/assets/images/ecm_courses/course_categories/node.png
340
363
  - app/assets/images/ecm_courses/course_categories/vertical_line.png
@@ -358,6 +381,9 @@ files:
358
381
  - lib/generators/ecm/courses/install/install_generator.rb
359
382
  - lib/generators/ecm/courses/install/templates/ecm_courses.rb
360
383
  - lib/tasks/ecm_courses_tasks.rake
384
+ - lib/ecm/courses/active_admin/ecm_courses_courses.rb
385
+ - lib/ecm/courses/active_admin/ecm_courses_course_categories.rb
386
+ - lib/ecm/courses/active_admin/ecm_courses_course_dates.rb
361
387
  - lib/ecm/courses/engine.rb
362
388
  - lib/ecm/courses/version.rb
363
389
  - lib/ecm/courses/routing.rb