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.
- checksums.yaml +4 -4
- data/{LICENSE.txt → MIT-LICENSE.txt} +0 -0
- data/README.md +4 -18
- data/Rakefile +6 -0
- data/app/assets/javascripts/calagator.js +1 -0
- data/app/assets/stylesheets/calagator/changes.scss +45 -0
- data/app/assets/stylesheets/calagator/errors.css +8 -0
- data/app/assets/stylesheets/calagator/forms.scss +148 -2
- data/app/assets/stylesheets/calagator/index.scss +21 -0
- data/app/assets/stylesheets/calagator/layout.scss +731 -0
- data/app/assets/stylesheets/calagator/mobile.scss +196 -0
- data/app/assets/stylesheets/calagator/{reset.css → reset.scss} +0 -0
- data/app/assets/stylesheets/calagator/typography.scss +225 -0
- data/app/assets/stylesheets/calagator/{common.scss → utils.scss} +0 -0
- data/app/assets/stylesheets/calagator/variables.scss +21 -0
- data/app/controllers/calagator/admin_controller.rb +1 -1
- data/app/controllers/calagator/application_controller.rb +3 -3
- data/app/controllers/calagator/events_controller.rb +3 -3
- data/app/controllers/calagator/site_controller.rb +1 -1
- data/app/controllers/calagator/sources_controller.rb +3 -3
- data/app/controllers/calagator/venues_controller.rb +4 -4
- data/app/controllers/calagator/versions_controller.rb +2 -2
- data/app/helpers/calagator/application_helper.rb +0 -3
- data/app/helpers/calagator/mapping_helper.rb +9 -8
- data/app/models/calagator/event.rb +2 -3
- data/app/models/calagator/event/ical_renderer.rb +4 -2
- data/app/models/calagator/event/saver.rb +2 -2
- data/app/models/calagator/event/search_engine/sql.rb +2 -1
- data/app/models/calagator/source.rb +0 -26
- data/app/models/calagator/source/importer.rb +1 -1
- data/app/models/calagator/source/parser/meetup.rb +2 -2
- data/app/models/calagator/venue.rb +0 -2
- data/app/models/calagator/venue/geocoder.rb +1 -1
- data/app/models/calagator/venue/search_engine/sql.rb +1 -1
- data/app/views/calagator/events/_subnav.html.erb +2 -2
- data/app/views/calagator/events/show.html.erb +2 -2
- data/app/views/calagator/site/_description.html.erb +6 -3
- data/app/views/calagator/site/_sidebar_menu.html.erb +13 -0
- data/app/views/calagator/site/index.html.erb +1 -0
- data/app/views/calagator/sources/index.html.erb +1 -1
- data/app/views/calagator/sources/show.html.erb +1 -1
- data/app/views/calagator/venues/_subnav.html.erb +1 -1
- data/app/views/calagator/venues/show.html.erb +1 -1
- data/app/views/layouts/calagator/_after_footer.html.erb +2 -0
- data/app/views/layouts/calagator/_content.html.erb +6 -0
- data/app/views/layouts/calagator/_footer.html.erb +8 -0
- data/app/views/layouts/calagator/_global_search.html.erb +11 -0
- data/app/views/layouts/calagator/_header.html.erb +20 -0
- data/app/views/layouts/calagator/application.html.erb +9 -64
- data/config/routes.rb +16 -16
- data/config/spring.rb +1 -0
- data/db/development +0 -0
- data/db/development.sqlite3 +0 -0
- data/db/migrate/20150407014752_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb +14 -0
- data/db/migrate/20150407014754_change_collation_for_tag_names.acts_as_taggable_on_engine.rb +9 -0
- data/db/schema.rb +2 -8
- data/db/seeds.rb +64 -8
- data/lib/calagator.rb +42 -2
- data/lib/calagator/duplicate_checking/duplicate_finder.rb +1 -1
- data/lib/calagator/duplicate_checking/duplicate_squasher.rb +1 -1
- data/lib/calagator/engine.rb +12 -22
- data/lib/calagator/tag_model_extensions.rb +1 -1
- data/lib/calagator/version.rb +1 -1
- data/lib/generators/calagator/install_generator.rb +17 -12
- data/lib/generators/calagator/templates/config/initializers/01_calagator.rb +89 -0
- data/lib/generators/calagator/templates/config/initializers/02_geokit.rb +106 -0
- data/lib/tasks/sunspot_reindex_calagator.rake +16 -3
- data/lib/tasks/update_counter_caches.rake +3 -3
- data/spec/controllers/calagator/events_controller_spec.rb +3 -3
- data/spec/controllers/calagator/sources_controller_spec.rb +3 -3
- data/spec/controllers/calagator/venues_controller_spec.rb +5 -5
- data/spec/dummy/Gemfile +35 -27
- data/spec/dummy/README.rdoc +15 -248
- data/spec/dummy/Rakefile +1 -2
- data/spec/dummy/app/assets/javascripts/application.js +5 -4
- data/spec/dummy/app/assets/stylesheets/application.css +6 -4
- data/spec/dummy/app/controllers/application_controller.rb +3 -1
- data/spec/dummy/app/views/layouts/application.html.erb +2 -2
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/setup +29 -0
- data/spec/dummy/config.ru +2 -2
- data/spec/dummy/config/application.rb +5 -41
- data/spec/dummy/config/boot.rb +1 -4
- data/spec/dummy/config/database.yml +8 -8
- data/spec/dummy/config/environment.rb +3 -3
- data/spec/dummy/config/environments/development.rb +22 -18
- data/spec/dummy/config/environments/production.rb +46 -34
- data/spec/dummy/config/environments/test.rb +19 -14
- data/spec/dummy/config/initializers/01_calagator.rb +89 -0
- data/spec/dummy/config/initializers/02_geokit.rb +106 -0
- data/spec/dummy/config/initializers/assets.rb +11 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +6 -5
- data/spec/dummy/config/initializers/mime_types.rb +0 -1
- data/spec/dummy/config/initializers/session_store.rb +1 -6
- data/spec/dummy/config/initializers/wrap_parameters.rb +6 -6
- data/spec/dummy/config/locales/en.yml +20 -2
- data/spec/dummy/config/routes.rb +23 -25
- data/spec/dummy/config/secrets.yml +16 -77
- data/spec/dummy/config/sunspot.yml +23 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +31 -30
- data/spec/dummy/db/seeds.rb +1 -0
- data/spec/dummy/log/development.log +257 -235
- data/spec/dummy/public/404.html +54 -13
- data/spec/dummy/public/422.html +54 -13
- data/spec/dummy/public/500.html +53 -12
- data/spec/dummy/public/robots.txt +2 -2
- data/spec/dummy/test/test_helper.rb +2 -5
- data/spec/factories.rb +0 -54
- data/spec/features/admin_auth_spec.rb +2 -2
- data/spec/features/admin_lock_event_spec.rb +1 -1
- data/spec/features/import_events_from_feed_spec.rb +1 -1
- data/spec/helpers/calagator/google_event_export_helper_spec.rb +8 -11
- data/spec/helpers/calagator/sources_helper_spec.rb +1 -2
- data/spec/helpers/calagator/tags_helper_spec.rb +1 -2
- data/spec/models/calagator/event_spec.rb +7 -7
- data/spec/models/calagator/source/parser_meetup_spec.rb +3 -3
- data/spec/models/calagator/source_spec.rb +0 -29
- data/spec/models/calagator/venue_spec.rb +8 -11
- data/spec/spec_helper.rb +3 -1
- data/spec/support/admin_authentication.rb +2 -0
- data/spec/support/assert_dom_equal.rb +26 -0
- data/spec/support/paper_trail.rb +7 -0
- data/spec/support/rspec-activemodel-mocks_patch.rb +9 -0
- metadata +200 -280
- data/app/assets/stylesheets/calagator.scss +0 -8
- data/app/assets/stylesheets/calagator/datepicker.scss +0 -177
- data/app/assets/stylesheets/calagator/theme.css +0 -0
- data/app/models/event/search_engine/base.rb +0 -0
- data/config/deploy/local.rb +0 -37
- data/config/deploy/lucca.rb +0 -33
- data/config/initializers/geokit.rb +0 -74
- data/config/initializers/search_engine.rb +0 -4
- data/config/initializers/set_default_url_host.rb +0 -5
- data/db/test.sqlite3 +0 -0
- data/lib/generators/calagator/templates/config/calagator.rb +0 -26
- data/lib/generators/calagator/templates/config/secrets.yml.sample +0 -83
- data/lib/secrets_reader.rb +0 -76
- data/spec/dummy/Gemfile.lock +0 -195
- data/spec/dummy/app/assets/images/rails.png +0 -0
- data/spec/dummy/config/initializers/calagator.rb +0 -26
- data/spec/dummy/config/initializers/secret_token.rb +0 -7
- data/spec/dummy/db/migrate/20150309023304_create_events.calagator.rb +0 -18
- data/spec/dummy/db/migrate/20150309023305_create_venues.calagator.rb +0 -18
- data/spec/dummy/db/migrate/20150309023306_create_sources.calagator.rb +0 -17
- data/spec/dummy/db/migrate/20150309023307_add_detailed_fields_to_venue.calagator.rb +0 -20
- data/spec/dummy/db/migrate/20150309023308_add_end_time_to_events.calagator.rb +0 -10
- data/spec/dummy/db/migrate/20150309023309_add_source_id_to_events.calagator.rb +0 -10
- data/spec/dummy/db/migrate/20150309023310_add_source_id_to_venues.calagator.rb +0 -11
- data/spec/dummy/db/migrate/20150309023311_add_duplicate_of_column_to_venues.calagator.rb +0 -10
- data/spec/dummy/db/migrate/20150309023312_add_duplicate_of_column_to_events.calagator.rb +0 -10
- data/spec/dummy/db/migrate/20150309023313_change_lat_long_type.calagator.rb +0 -13
- data/spec/dummy/db/migrate/20150309023314_add_source_reimport.calagator.rb +0 -10
- data/spec/dummy/db/migrate/20150309023315_change_end_time_to_duration.calagator.rb +0 -12
- data/spec/dummy/db/migrate/20150309023316_remove_format_type_from_source.calagator.rb +0 -10
- data/spec/dummy/db/migrate/20150309023317_create_updates.calagator.rb +0 -16
- data/spec/dummy/db/migrate/20150309023318_remove_next_update_from_source.calagator.rb +0 -10
- data/spec/dummy/db/migrate/20150309023319_change_duration_to_end_time.calagator.rb +0 -12
- data/spec/dummy/db/migrate/20150309023320_create_tags_and_taggings.calagator.rb +0 -29
- data/spec/dummy/db/migrate/20150309023321_create_versioned_events.calagator.rb +0 -26
- data/spec/dummy/db/migrate/20150309023322_create_versioned_venues.calagator.rb +0 -33
- data/spec/dummy/db/migrate/20150309023323_add_rrule_to_events.calagator.rb +0 -16
- data/spec/dummy/db/migrate/20150309023324_create_versions.calagator.rb +0 -19
- data/spec/dummy/db/migrate/20150309023325_add_closed_flag_to_venues.calagator.rb +0 -10
- data/spec/dummy/db/migrate/20150309023326_add_wifi_flag_to_venues.calagator.rb +0 -10
- data/spec/dummy/db/migrate/20150309023327_add_access_notes_to_venues.calagator.rb +0 -10
- data/spec/dummy/db/migrate/20150309023328_add_events_count_to_venues.calagator.rb +0 -9
- data/spec/dummy/db/migrate/20150309023329_add_venue_details_to_events.calagator.rb +0 -10
- data/spec/dummy/db/migrate/20150309023330_acts_as_taggable_on_migration.calagator.rb +0 -51
- data/spec/dummy/db/migrate/20150309023331_cleanup.calagator.rb +0 -15
- data/spec/dummy/db/migrate/20150309023332_specify_venues_latitude_and_longitude_precision.calagator.rb +0 -12
- data/spec/dummy/db/migrate/20150309023333_remove_updates.calagator.rb +0 -14
- data/spec/dummy/db/migrate/20150309023334_add_locked_status_to_events.calagator.rb +0 -6
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/doc/README_FOR_APP +0 -2
- data/spec/dummy/script/rails +0 -6
- data/spec/dummy/test/performance/browsing_test.rb +0 -12
- 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,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,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,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,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
|
data/spec/dummy/db/test.sqlite3
DELETED
Binary file
|
data/spec/dummy/script/rails
DELETED
@@ -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
|