calagator 0.0.1.pre1 → 1.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (182) hide show
  1. checksums.yaml +4 -4
  2. data/{LICENSE.txt → MIT-LICENSE.txt} +0 -0
  3. data/README.md +4 -18
  4. data/Rakefile +6 -0
  5. data/app/assets/javascripts/calagator.js +1 -0
  6. data/app/assets/stylesheets/calagator/changes.scss +45 -0
  7. data/app/assets/stylesheets/calagator/errors.css +8 -0
  8. data/app/assets/stylesheets/calagator/forms.scss +148 -2
  9. data/app/assets/stylesheets/calagator/index.scss +21 -0
  10. data/app/assets/stylesheets/calagator/layout.scss +731 -0
  11. data/app/assets/stylesheets/calagator/mobile.scss +196 -0
  12. data/app/assets/stylesheets/calagator/{reset.css → reset.scss} +0 -0
  13. data/app/assets/stylesheets/calagator/typography.scss +225 -0
  14. data/app/assets/stylesheets/calagator/{common.scss → utils.scss} +0 -0
  15. data/app/assets/stylesheets/calagator/variables.scss +21 -0
  16. data/app/controllers/calagator/admin_controller.rb +1 -1
  17. data/app/controllers/calagator/application_controller.rb +3 -3
  18. data/app/controllers/calagator/events_controller.rb +3 -3
  19. data/app/controllers/calagator/site_controller.rb +1 -1
  20. data/app/controllers/calagator/sources_controller.rb +3 -3
  21. data/app/controllers/calagator/venues_controller.rb +4 -4
  22. data/app/controllers/calagator/versions_controller.rb +2 -2
  23. data/app/helpers/calagator/application_helper.rb +0 -3
  24. data/app/helpers/calagator/mapping_helper.rb +9 -8
  25. data/app/models/calagator/event.rb +2 -3
  26. data/app/models/calagator/event/ical_renderer.rb +4 -2
  27. data/app/models/calagator/event/saver.rb +2 -2
  28. data/app/models/calagator/event/search_engine/sql.rb +2 -1
  29. data/app/models/calagator/source.rb +0 -26
  30. data/app/models/calagator/source/importer.rb +1 -1
  31. data/app/models/calagator/source/parser/meetup.rb +2 -2
  32. data/app/models/calagator/venue.rb +0 -2
  33. data/app/models/calagator/venue/geocoder.rb +1 -1
  34. data/app/models/calagator/venue/search_engine/sql.rb +1 -1
  35. data/app/views/calagator/events/_subnav.html.erb +2 -2
  36. data/app/views/calagator/events/show.html.erb +2 -2
  37. data/app/views/calagator/site/_description.html.erb +6 -3
  38. data/app/views/calagator/site/_sidebar_menu.html.erb +13 -0
  39. data/app/views/calagator/site/index.html.erb +1 -0
  40. data/app/views/calagator/sources/index.html.erb +1 -1
  41. data/app/views/calagator/sources/show.html.erb +1 -1
  42. data/app/views/calagator/venues/_subnav.html.erb +1 -1
  43. data/app/views/calagator/venues/show.html.erb +1 -1
  44. data/app/views/layouts/calagator/_after_footer.html.erb +2 -0
  45. data/app/views/layouts/calagator/_content.html.erb +6 -0
  46. data/app/views/layouts/calagator/_footer.html.erb +8 -0
  47. data/app/views/layouts/calagator/_global_search.html.erb +11 -0
  48. data/app/views/layouts/calagator/_header.html.erb +20 -0
  49. data/app/views/layouts/calagator/application.html.erb +9 -64
  50. data/config/routes.rb +16 -16
  51. data/config/spring.rb +1 -0
  52. data/db/development +0 -0
  53. data/db/development.sqlite3 +0 -0
  54. data/db/migrate/20150407014752_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb +14 -0
  55. data/db/migrate/20150407014754_change_collation_for_tag_names.acts_as_taggable_on_engine.rb +9 -0
  56. data/db/schema.rb +2 -8
  57. data/db/seeds.rb +64 -8
  58. data/lib/calagator.rb +42 -2
  59. data/lib/calagator/duplicate_checking/duplicate_finder.rb +1 -1
  60. data/lib/calagator/duplicate_checking/duplicate_squasher.rb +1 -1
  61. data/lib/calagator/engine.rb +12 -22
  62. data/lib/calagator/tag_model_extensions.rb +1 -1
  63. data/lib/calagator/version.rb +1 -1
  64. data/lib/generators/calagator/install_generator.rb +17 -12
  65. data/lib/generators/calagator/templates/config/initializers/01_calagator.rb +89 -0
  66. data/lib/generators/calagator/templates/config/initializers/02_geokit.rb +106 -0
  67. data/lib/tasks/sunspot_reindex_calagator.rake +16 -3
  68. data/lib/tasks/update_counter_caches.rake +3 -3
  69. data/spec/controllers/calagator/events_controller_spec.rb +3 -3
  70. data/spec/controllers/calagator/sources_controller_spec.rb +3 -3
  71. data/spec/controllers/calagator/venues_controller_spec.rb +5 -5
  72. data/spec/dummy/Gemfile +35 -27
  73. data/spec/dummy/README.rdoc +15 -248
  74. data/spec/dummy/Rakefile +1 -2
  75. data/spec/dummy/app/assets/javascripts/application.js +5 -4
  76. data/spec/dummy/app/assets/stylesheets/application.css +6 -4
  77. data/spec/dummy/app/controllers/application_controller.rb +3 -1
  78. data/spec/dummy/app/views/layouts/application.html.erb +2 -2
  79. data/spec/dummy/bin/bundle +3 -0
  80. data/spec/dummy/bin/rails +4 -0
  81. data/spec/dummy/bin/rake +4 -0
  82. data/spec/dummy/bin/setup +29 -0
  83. data/spec/dummy/config.ru +2 -2
  84. data/spec/dummy/config/application.rb +5 -41
  85. data/spec/dummy/config/boot.rb +1 -4
  86. data/spec/dummy/config/database.yml +8 -8
  87. data/spec/dummy/config/environment.rb +3 -3
  88. data/spec/dummy/config/environments/development.rb +22 -18
  89. data/spec/dummy/config/environments/production.rb +46 -34
  90. data/spec/dummy/config/environments/test.rb +19 -14
  91. data/spec/dummy/config/initializers/01_calagator.rb +89 -0
  92. data/spec/dummy/config/initializers/02_geokit.rb +106 -0
  93. data/spec/dummy/config/initializers/assets.rb +11 -0
  94. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  95. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  96. data/spec/dummy/config/initializers/inflections.rb +6 -5
  97. data/spec/dummy/config/initializers/mime_types.rb +0 -1
  98. data/spec/dummy/config/initializers/session_store.rb +1 -6
  99. data/spec/dummy/config/initializers/wrap_parameters.rb +6 -6
  100. data/spec/dummy/config/locales/en.yml +20 -2
  101. data/spec/dummy/config/routes.rb +23 -25
  102. data/spec/dummy/config/secrets.yml +16 -77
  103. data/spec/dummy/config/sunspot.yml +23 -0
  104. data/spec/dummy/db/development.sqlite3 +0 -0
  105. data/spec/dummy/db/schema.rb +31 -30
  106. data/spec/dummy/db/seeds.rb +1 -0
  107. data/spec/dummy/log/development.log +257 -235
  108. data/spec/dummy/public/404.html +54 -13
  109. data/spec/dummy/public/422.html +54 -13
  110. data/spec/dummy/public/500.html +53 -12
  111. data/spec/dummy/public/robots.txt +2 -2
  112. data/spec/dummy/test/test_helper.rb +2 -5
  113. data/spec/factories.rb +0 -54
  114. data/spec/features/admin_auth_spec.rb +2 -2
  115. data/spec/features/admin_lock_event_spec.rb +1 -1
  116. data/spec/features/import_events_from_feed_spec.rb +1 -1
  117. data/spec/helpers/calagator/google_event_export_helper_spec.rb +8 -11
  118. data/spec/helpers/calagator/sources_helper_spec.rb +1 -2
  119. data/spec/helpers/calagator/tags_helper_spec.rb +1 -2
  120. data/spec/models/calagator/event_spec.rb +7 -7
  121. data/spec/models/calagator/source/parser_meetup_spec.rb +3 -3
  122. data/spec/models/calagator/source_spec.rb +0 -29
  123. data/spec/models/calagator/venue_spec.rb +8 -11
  124. data/spec/spec_helper.rb +3 -1
  125. data/spec/support/admin_authentication.rb +2 -0
  126. data/spec/support/assert_dom_equal.rb +26 -0
  127. data/spec/support/paper_trail.rb +7 -0
  128. data/spec/support/rspec-activemodel-mocks_patch.rb +9 -0
  129. metadata +200 -280
  130. data/app/assets/stylesheets/calagator.scss +0 -8
  131. data/app/assets/stylesheets/calagator/datepicker.scss +0 -177
  132. data/app/assets/stylesheets/calagator/theme.css +0 -0
  133. data/app/models/event/search_engine/base.rb +0 -0
  134. data/config/deploy/local.rb +0 -37
  135. data/config/deploy/lucca.rb +0 -33
  136. data/config/initializers/geokit.rb +0 -74
  137. data/config/initializers/search_engine.rb +0 -4
  138. data/config/initializers/set_default_url_host.rb +0 -5
  139. data/db/test.sqlite3 +0 -0
  140. data/lib/generators/calagator/templates/config/calagator.rb +0 -26
  141. data/lib/generators/calagator/templates/config/secrets.yml.sample +0 -83
  142. data/lib/secrets_reader.rb +0 -76
  143. data/spec/dummy/Gemfile.lock +0 -195
  144. data/spec/dummy/app/assets/images/rails.png +0 -0
  145. data/spec/dummy/config/initializers/calagator.rb +0 -26
  146. data/spec/dummy/config/initializers/secret_token.rb +0 -7
  147. data/spec/dummy/db/migrate/20150309023304_create_events.calagator.rb +0 -18
  148. data/spec/dummy/db/migrate/20150309023305_create_venues.calagator.rb +0 -18
  149. data/spec/dummy/db/migrate/20150309023306_create_sources.calagator.rb +0 -17
  150. data/spec/dummy/db/migrate/20150309023307_add_detailed_fields_to_venue.calagator.rb +0 -20
  151. data/spec/dummy/db/migrate/20150309023308_add_end_time_to_events.calagator.rb +0 -10
  152. data/spec/dummy/db/migrate/20150309023309_add_source_id_to_events.calagator.rb +0 -10
  153. data/spec/dummy/db/migrate/20150309023310_add_source_id_to_venues.calagator.rb +0 -11
  154. data/spec/dummy/db/migrate/20150309023311_add_duplicate_of_column_to_venues.calagator.rb +0 -10
  155. data/spec/dummy/db/migrate/20150309023312_add_duplicate_of_column_to_events.calagator.rb +0 -10
  156. data/spec/dummy/db/migrate/20150309023313_change_lat_long_type.calagator.rb +0 -13
  157. data/spec/dummy/db/migrate/20150309023314_add_source_reimport.calagator.rb +0 -10
  158. data/spec/dummy/db/migrate/20150309023315_change_end_time_to_duration.calagator.rb +0 -12
  159. data/spec/dummy/db/migrate/20150309023316_remove_format_type_from_source.calagator.rb +0 -10
  160. data/spec/dummy/db/migrate/20150309023317_create_updates.calagator.rb +0 -16
  161. data/spec/dummy/db/migrate/20150309023318_remove_next_update_from_source.calagator.rb +0 -10
  162. data/spec/dummy/db/migrate/20150309023319_change_duration_to_end_time.calagator.rb +0 -12
  163. data/spec/dummy/db/migrate/20150309023320_create_tags_and_taggings.calagator.rb +0 -29
  164. data/spec/dummy/db/migrate/20150309023321_create_versioned_events.calagator.rb +0 -26
  165. data/spec/dummy/db/migrate/20150309023322_create_versioned_venues.calagator.rb +0 -33
  166. data/spec/dummy/db/migrate/20150309023323_add_rrule_to_events.calagator.rb +0 -16
  167. data/spec/dummy/db/migrate/20150309023324_create_versions.calagator.rb +0 -19
  168. data/spec/dummy/db/migrate/20150309023325_add_closed_flag_to_venues.calagator.rb +0 -10
  169. data/spec/dummy/db/migrate/20150309023326_add_wifi_flag_to_venues.calagator.rb +0 -10
  170. data/spec/dummy/db/migrate/20150309023327_add_access_notes_to_venues.calagator.rb +0 -10
  171. data/spec/dummy/db/migrate/20150309023328_add_events_count_to_venues.calagator.rb +0 -9
  172. data/spec/dummy/db/migrate/20150309023329_add_venue_details_to_events.calagator.rb +0 -10
  173. data/spec/dummy/db/migrate/20150309023330_acts_as_taggable_on_migration.calagator.rb +0 -51
  174. data/spec/dummy/db/migrate/20150309023331_cleanup.calagator.rb +0 -15
  175. data/spec/dummy/db/migrate/20150309023332_specify_venues_latitude_and_longitude_precision.calagator.rb +0 -12
  176. data/spec/dummy/db/migrate/20150309023333_remove_updates.calagator.rb +0 -14
  177. data/spec/dummy/db/migrate/20150309023334_add_locked_status_to_events.calagator.rb +0 -6
  178. data/spec/dummy/db/test.sqlite3 +0 -0
  179. data/spec/dummy/doc/README_FOR_APP +0 -2
  180. data/spec/dummy/script/rails +0 -6
  181. data/spec/dummy/test/performance/browsing_test.rb +0 -12
  182. data/spec/lib/secrets_reader_spec.rb +0 -65
@@ -1,13 +0,0 @@
1
- # This migration comes from calagator (originally 11)
2
- class ChangeLatLongType < ActiveRecord::Migration
3
- def self.up
4
- # :decimal is more precise than :float, and we need that for lat/long.
5
- change_column :venues, :latitude, :decimal, :precision => 15, :scale => 10
6
- change_column :venues, :longitude, :decimal, :precision => 15, :scale => 10
7
- end
8
-
9
- def self.down
10
- change_column :venues, :latitude, :float
11
- change_column :venues, :longitude, :float
12
- end
13
- end
@@ -1,10 +0,0 @@
1
- # This migration comes from calagator (originally 12)
2
- class AddSourceReimport < ActiveRecord::Migration
3
- def self.up
4
- add_column :sources, :reimport, :boolean
5
- end
6
-
7
- def self.down
8
- remove_column :sources, :reimport
9
- end
10
- end
@@ -1,12 +0,0 @@
1
- # This migration comes from calagator (originally 13)
2
- class ChangeEndTimeToDuration < ActiveRecord::Migration
3
- def self.up
4
- add_column :events, :duration, :integer
5
- remove_column :events, :end_time
6
- end
7
-
8
- def self.down
9
- add_column :events, :end_time, :datetime
10
- remove_column :events, :duration
11
- end
12
- end
@@ -1,10 +0,0 @@
1
- # This migration comes from calagator (originally 14)
2
- class RemoveFormatTypeFromSource < ActiveRecord::Migration
3
- def self.up
4
- remove_column :sources, :format_type
5
- end
6
-
7
- def self.down
8
- add_column :sources, :format_type, :string
9
- end
10
- end
@@ -1,16 +0,0 @@
1
- # This migration comes from calagator (originally 15)
2
- class CreateUpdates < ActiveRecord::Migration
3
- def self.up
4
- create_table :updates do |t|
5
- t.integer "source_id"
6
- t.text "status"
7
- t.timestamps
8
- end
9
- add_column :sources, :next_update, :datetime
10
- end
11
-
12
- def self.down
13
- remove_column :sources, :next_update
14
- drop_table :updates
15
- end
16
- end
@@ -1,10 +0,0 @@
1
- # This migration comes from calagator (originally 16)
2
- class RemoveNextUpdateFromSource < ActiveRecord::Migration
3
- def self.up
4
- remove_column :sources, :next_update
5
- end
6
-
7
- def self.down
8
- add_column :sources, :next_update, :datetime
9
- end
10
- end
@@ -1,12 +0,0 @@
1
- # This migration comes from calagator (originally 20080705163959)
2
- class ChangeDurationToEndTime < ActiveRecord::Migration
3
- def self.up
4
- add_column :events, :end_time, :datetime
5
- remove_column :events, :duration
6
- end
7
-
8
- def self.down
9
- add_column :events, :duration, :integer
10
- remove_column :events, :end_time
11
- end
12
- end
@@ -1,29 +0,0 @@
1
- # This migration comes from calagator (originally 20080705164959)
2
-
3
- # A migration to add tables for Tag and Tagging. This file is automatically generated and added to your app if you run the tagging generator included with has_many_polymorphs.
4
-
5
- class CreateTagsAndTaggings < ActiveRecord::Migration
6
-
7
- # Add the new tables.
8
- def self.up
9
- create_table :tags do |t|
10
- t.column :name, :string, :null => false
11
- end
12
- add_index :tags, :name, :unique => true
13
-
14
- create_table :taggings do |t|
15
- t.column :tag_id, :integer, :null => false
16
- t.column :taggable_id, :integer, :null => false
17
- t.column :taggable_type, :string, :null => false
18
- # t.column :position, :integer # Uncomment this if you need to use <tt>acts_as_list</tt>.
19
- end
20
- add_index :taggings, [:tag_id, :taggable_id, :taggable_type], :unique => true
21
- end
22
-
23
- # Remove the tables.
24
- def self.down
25
- drop_table :tags
26
- drop_table :taggings
27
- end
28
-
29
- end
@@ -1,26 +0,0 @@
1
- # This migration comes from calagator (originally 20081011181519)
2
- class CreateVersionedEvents < ActiveRecord::Migration
3
- # NOTE: This migration's contents have been commented-out because they relied
4
- # on the old +acts_as_versioned+ plugin that has since replaced with the
5
- # +papertrail+ plugin.
6
-
7
- def self.up
8
- ### Event.create_versioned_table do |t|
9
- ### t.string "title"
10
- ### t.text "description"
11
- ### t.datetime "start_time"
12
- ### t.string "url"
13
- ### t.datetime "created_at"
14
- ### t.datetime "updated_at"
15
- ### t.integer "venue_id"
16
- ### t.integer "source_id"
17
- ### t.integer "duplicate_of_id"
18
- ### t.datetime "end_time"
19
- ### t.integer "version"
20
- ### end
21
- end
22
-
23
- def self.down
24
- ### Event.drop_versioned_table
25
- end
26
- end
@@ -1,33 +0,0 @@
1
- # This migration comes from calagator (originally 20081011193124)
2
- class CreateVersionedVenues < ActiveRecord::Migration
3
- # NOTE: This migration's contents have been commented-out because they relied
4
- # on the old +acts_as_versioned+ plugin that we've since replaced with the
5
- # +papertrail+ plugin.
6
- #
7
- def self.up
8
- ### Venue.create_versioned_table do |t|
9
- ### t.string "title"
10
- ### t.text "description"
11
- ### t.string "address"
12
- ### t.string "url"
13
- ### t.datetime "created_at"
14
- ### t.datetime "updated_at"
15
- ### t.string "street_address"
16
- ### t.string "locality"
17
- ### t.string "region"
18
- ### t.string "postal_code"
19
- ### t.string "country"
20
- ### t.decimal "latitude"
21
- ### t.decimal "longitude"
22
- ### t.string "email"
23
- ### t.string "telephone"
24
- ### t.integer "source_id"
25
- ### t.integer "duplicate_of_id"
26
- ### t.integer "version"
27
- ### end
28
- end
29
-
30
- def self.down
31
- ### Venue.drop_versioned_table
32
- end
33
- end
@@ -1,16 +0,0 @@
1
- # This migration comes from calagator (originally 20081115190515)
2
- class AddRruleToEvents < ActiveRecord::Migration
3
- # NOTE: Some of this migration's contents have been commented-out because
4
- # they used tables created for the old +acts_as_versioned+ plugin that has
5
- # since replaced with the +papertrail+ plugin.
6
-
7
- def self.up
8
- add_column :events, :rrule, :string
9
- ### add_column :event_versions, :rrule, :string
10
- end
11
-
12
- def self.down
13
- remove_column :events, :rrule
14
- ### remove_column :event_versions, :rrule
15
- end
16
- end
@@ -1,19 +0,0 @@
1
- # This migration comes from calagator (originally 20090912082129)
2
- class CreateVersions < ActiveRecord::Migration
3
- def self.up
4
- create_table :versions do |t|
5
- t.string :item_type, :null => false
6
- t.integer :item_id, :null => false
7
- t.string :event, :null => false
8
- t.string :whodunnit
9
- t.text :object
10
- t.datetime :created_at
11
- end
12
- add_index :versions, [:item_type, :item_id]
13
- end
14
-
15
- def self.down
16
- remove_index :versions, [:item_type, :item_id]
17
- drop_table :versions
18
- end
19
- end
@@ -1,10 +0,0 @@
1
- # This migration comes from calagator (originally 20110219205156)
2
- class AddClosedFlagToVenues < ActiveRecord::Migration
3
- def self.up
4
- add_column :venues, :closed, :boolean, :default => false
5
- end
6
-
7
- def self.down
8
- remove_column :venues, :closed
9
- end
10
- end
@@ -1,10 +0,0 @@
1
- # This migration comes from calagator (originally 20110220001008)
2
- class AddWifiFlagToVenues < ActiveRecord::Migration
3
- def self.up
4
- add_column :venues, :wifi, :boolean, :default => false
5
- end
6
-
7
- def self.down
8
- remove_column :venues, :wifi
9
- end
10
- end
@@ -1,10 +0,0 @@
1
- # This migration comes from calagator (originally 20110220011427)
2
- class AddAccessNotesToVenues < ActiveRecord::Migration
3
- def self.up
4
- add_column :venues, :access_notes, :text
5
- end
6
-
7
- def self.down
8
- remove_column :venues, :access_notes
9
- end
10
- end
@@ -1,9 +0,0 @@
1
- # This migration comes from calagator (originally 20110220031117)
2
- class AddEventsCountToVenues < ActiveRecord::Migration
3
- def self.up
4
- add_column :venues, :events_count, :integer
5
- end
6
- def self.down
7
- remove_column :venues, :events_count
8
- end
9
- end
@@ -1,10 +0,0 @@
1
- # This migration comes from calagator (originally 20110604174521)
2
- class AddVenueDetailsToEvents < ActiveRecord::Migration
3
- def self.up
4
- add_column :events, :venue_details, :text
5
- end
6
-
7
- def self.down
8
- remove_column :events, :venue_details
9
- end
10
- end
@@ -1,51 +0,0 @@
1
- # This migration comes from calagator (originally 20110717231316)
2
- class ActsAsTaggableOnMigration < ActiveRecord::Migration
3
- def self.up
4
- # We already have a Tag model with a name
5
- # create_table :tags do |t|
6
- # t.string :name
7
- # end
8
-
9
- # We already have a Taggings model with tag_id, taggable_id and taggable_type
10
- # so we'll just add the tagger, context, and created_at columns.
11
- add_column :taggings, :tagger_id, :integer
12
- add_column :taggings, :tagger_type, :string
13
- add_column :taggings, :context, :string
14
- add_column :taggings, :created_at, :datetime
15
-
16
- # We need to set the context on all existing tags to "tags" for them to be recognized
17
- execute "UPDATE taggings SET context='tags' WHERE context IS NULL"
18
-
19
- # create_table :taggings do |t|
20
- # t.references :tag
21
-
22
- # # You should make sure that the column created is
23
- # # long enough to store the required class names.
24
- # t.references :taggable, :polymorphic => true
25
- # t.references :tagger, :polymorphic => true
26
-
27
- # t.string :context
28
-
29
- # t.datetime :created_at
30
- # end
31
-
32
- remove_index :taggings, :column => ["tag_id", "taggable_id", "taggable_type"]
33
- add_index :taggings, :tag_id
34
- add_index :taggings, [:taggable_id, :taggable_type, :context]
35
- end
36
-
37
- def self.down
38
- remove_index :taggings, :tag_id
39
- remove_index :taggings, :column => [:taggable_id, :taggable_type, :context]
40
-
41
- remove_column :taggings, :tagger_id
42
- remove_column :taggings, :tagger_type
43
- remove_column :taggings, :context
44
- remove_column :taggings, :created_at
45
-
46
- add_index "taggings", ["tag_id", "taggable_id", "taggable_type"], :name => "index_taggings_on_tag_id_and_taggable_id_and_taggable_type", :unique => true
47
-
48
- # drop_table :taggings
49
- # drop_table :tags
50
- end
51
- end
@@ -1,15 +0,0 @@
1
- # This migration comes from calagator (originally 20120709092821)
2
- class Cleanup < ActiveRecord::Migration
3
- # Remove obsolete tables and columns that may have been left behind by other migrations.
4
- def self.up
5
- if ActiveRecord::Base.connection.columns('venues').map(&:name).include?("version")
6
- remove_column :venues, :version
7
- end
8
-
9
- %w[event_versions venue_versions].each do |table|
10
- if ActiveRecord::Base.connection.tables.include?(table)
11
- drop_table table
12
- end
13
- end
14
- end
15
- end
@@ -1,12 +0,0 @@
1
- # This migration comes from calagator (originally 20120831234448)
2
- class SpecifyVenuesLatitudeAndLongitudePrecision < ActiveRecord::Migration
3
- def up
4
- change_column :venues, :latitude, :decimal, :precision => 7, :scale => 4
5
- change_column :venues, :longitude, :decimal, :precision => 7, :scale => 4
6
- end
7
-
8
- def down
9
- change_column :venues, :latitude, :decimal
10
- change_column :venues, :longitude, :decimal
11
- end
12
- end
@@ -1,14 +0,0 @@
1
- # This migration comes from calagator (originally 20150206085809)
2
- class RemoveUpdates < ActiveRecord::Migration
3
- def up
4
- drop_table :updates
5
- end
6
-
7
- def down
8
- create_table :updates do |t|
9
- t.integer "source_id"
10
- t.text "status"
11
- t.timestamps
12
- end
13
- end
14
- end
@@ -1,6 +0,0 @@
1
- # This migration comes from calagator (originally 20150207231355)
2
- class AddLockedStatusToEvents < ActiveRecord::Migration
3
- def change
4
- add_column :events, :locked, :boolean, :default => false
5
- end
6
- end
Binary file
@@ -1,2 +0,0 @@
1
- Use this README file to introduce your application and point to useful places in the API for learning more.
2
- Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
-
4
- APP_PATH = File.expand_path('../../config/application', __FILE__)
5
- require File.expand_path('../../config/boot', __FILE__)
6
- require 'rails/commands'
@@ -1,12 +0,0 @@
1
- require 'test_helper'
2
- require 'rails/performance_test_help'
3
-
4
- class BrowsingTest < ActionDispatch::PerformanceTest
5
- # Refer to the documentation for all available options
6
- # self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
7
- # :output => 'tmp/performance', :formats => [:flat] }
8
-
9
- def test_homepage
10
- get '/'
11
- end
12
- end
@@ -1,65 +0,0 @@
1
- describe SecretsReader do
2
- describe ".read" do
3
- let(:yml) { <<-YML }
4
- administrator_email: 'your@email.addr'
5
- mapping:
6
- marker_color: green
7
- google_maps_api_key: <your google maps v3 API key>
8
- YML
9
-
10
- it "returns an openstruct read from the given file path" do
11
- path = "myfile.yml"
12
- allow(File).to receive(:exist?).with(path).and_return(true)
13
- allow(File).to receive(:read).with(path).and_return(yml)
14
-
15
- expect(SecretsReader.read(path)).to eq OpenStruct.new({
16
- "administrator_email" => "your@email.addr",
17
- "mapping" => {
18
- "marker_color" => "green",
19
- "google_maps_api_key" => "<your google maps v3 API key>",
20
- }
21
- })
22
- end
23
-
24
- it "defaults to config/secrets.yml" do
25
- path = Rails.root.join("config/secrets.yml").to_s
26
- allow(File).to receive(:exist?).with(path).and_return(true)
27
- allow(File).to receive(:read).with(path).and_return(yml)
28
-
29
- expect(SecretsReader.read).to eq OpenStruct.new({
30
- "administrator_email" => "your@email.addr",
31
- "mapping" => {
32
- "marker_color" => "green",
33
- "google_maps_api_key" => "<your google maps v3 API key>",
34
- }
35
- })
36
- end
37
-
38
- it "will fall back to config/secrets.yml.sample" do
39
- default_path = Rails.root.join("config/secrets.yml").to_s
40
- allow(File).to receive(:exist?).with(default_path).and_return(false)
41
-
42
- path = Rails.root.join("config/secrets.yml.sample").to_s
43
- allow(File).to receive(:exist?).with(path).and_return(true)
44
- allow(File).to receive(:read).with(path).and_return(yml)
45
-
46
- expect(SecretsReader.read).to eq OpenStruct.new({
47
- "administrator_email" => "your@email.addr",
48
- "mapping" => {
49
- "marker_color" => "green",
50
- "google_maps_api_key" => "<your google maps v3 API key>",
51
- }
52
- })
53
- end
54
-
55
- it "returns an empty openstruct if all fails" do
56
- default_path = Rails.root.join("config/secrets.yml").to_s
57
- allow(File).to receive(:exist?).with(default_path).and_return(false)
58
-
59
- path = Rails.root.join("config/secrets.yml.sample").to_s
60
- allow(File).to receive(:exist?).with(path).and_return(false)
61
-
62
- expect(SecretsReader.read).to eq OpenStruct.new
63
- end
64
- end
65
- end