impressionist 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +11 -0
- data/.rspec +1 -0
- data/.travis.yml +11 -0
- data/CHANGELOG.rdoc +1 -1
- data/Gemfile +8 -19
- data/README.md +65 -34
- data/Rakefile +10 -82
- data/app/controllers/impressionist_controller.rb +11 -11
- data/app/models/impression.rb +2 -15
- data/app/models/impressionist/bots.rb +3 -3
- data/app/models/impressionist/impressionable.rb +29 -41
- data/impressionist.gemspec +22 -65
- data/lib/generators/active_record/impressionist_generator.rb +21 -0
- data/lib/generators/{impressionist → active_record}/templates/create_impressions_table.rb +1 -9
- data/lib/generators/impressionist_generator.rb +12 -0
- data/lib/generators/mongo_mapper/impressionist_generator.rb +8 -0
- data/lib/generators/templates/impression.rb +5 -0
- data/lib/impressionist.rb +10 -3
- data/lib/impressionist/bots.rb +1 -1
- data/lib/impressionist/engine.rb +11 -3
- data/lib/impressionist/models/active_record/impression.rb +18 -0
- data/lib/impressionist/models/active_record/impressionist/impressionable.rb +12 -0
- data/lib/impressionist/models/mongo_mapper/impression.rb +17 -0
- data/lib/impressionist/models/mongo_mapper/impressionist/impressionable.rb +12 -0
- data/lib/impressionist/version.rb +3 -0
- data/test_app/.gitignore +17 -0
- data/test_app/.rspec +1 -0
- data/test_app/Gemfile +58 -0
- data/test_app/README +256 -0
- data/test_app/README.rdoc +261 -0
- data/test_app/Rakefile +7 -0
- data/test_app/app/assets/images/rails.png +0 -0
- data/test_app/app/assets/javascripts/application.js +15 -0
- data/test_app/app/assets/stylesheets/application.css +13 -0
- data/test_app/app/controllers/application_controller.rb +8 -0
- data/test_app/app/controllers/articles_controller.rb +18 -0
- data/test_app/app/controllers/dummy_controller.rb +6 -0
- data/test_app/app/controllers/posts_controller.rb +23 -0
- data/test_app/app/controllers/widgets_controller.rb +13 -0
- data/test_app/app/helpers/application_helper.rb +2 -0
- data/{lib/impressionist/railties/tasks.rake → test_app/app/mailers/.gitkeep} +0 -0
- data/test_app/app/models/.gitkeep +0 -0
- data/test_app/app/models/article.rb +3 -0
- data/test_app/app/models/dummy.rb +7 -0
- data/test_app/app/models/post.rb +3 -0
- data/test_app/app/models/user.rb +3 -0
- data/test_app/app/models/widget.rb +3 -0
- data/test_app/app/views/articles/index.html.erb +1 -0
- data/test_app/app/views/articles/show.html.erb +1 -0
- data/test_app/app/views/layouts/application.html.erb +14 -0
- data/test_app/app/views/posts/edit.html.erb +0 -0
- data/test_app/app/views/posts/index.html.erb +0 -0
- data/test_app/app/views/posts/show.html.erb +0 -0
- data/test_app/app/views/widgets/index.html.erb +0 -0
- data/test_app/app/views/widgets/new.html.erb +0 -0
- data/test_app/app/views/widgets/show.html.erb +0 -0
- data/test_app/config.ru +4 -0
- data/test_app/config/application.rb +59 -0
- data/test_app/config/boot.rb +6 -0
- data/test_app/config/cucumber.yml +8 -0
- data/test_app/config/database.yml +30 -0
- data/test_app/config/environment.rb +5 -0
- data/test_app/config/environments/development.rb +37 -0
- data/test_app/config/environments/pg_test.rb +35 -0
- data/test_app/config/environments/production.rb +67 -0
- data/test_app/config/environments/test.rb +37 -0
- data/test_app/config/initializers/backtrace_silencers.rb +7 -0
- data/test_app/config/initializers/impression.rb +5 -0
- data/test_app/config/initializers/inflections.rb +15 -0
- data/test_app/config/initializers/mime_types.rb +5 -0
- data/test_app/config/initializers/secret_token.rb +7 -0
- data/test_app/config/initializers/session_store.rb +8 -0
- data/test_app/config/initializers/wrap_parameters.rb +14 -0
- data/test_app/config/locales/en.yml +5 -0
- data/test_app/config/routes.rb +3 -0
- data/test_app/db/migrate/20110201153144_create_articles.rb +13 -0
- data/test_app/db/migrate/20110210205028_create_posts.rb +13 -0
- data/test_app/db/migrate/20111127184039_create_widgets.rb +15 -0
- data/test_app/db/seeds.rb +7 -0
- data/test_app/lib/assets/.gitkeep +0 -0
- data/test_app/lib/tasks/.gitkeep +0 -0
- data/test_app/lib/tasks/cucumber.rake +53 -0
- data/test_app/log/.gitkeep +0 -0
- data/test_app/public/404.html +26 -0
- data/test_app/public/422.html +26 -0
- data/test_app/public/500.html +25 -0
- data/test_app/public/favicon.ico +0 -0
- data/test_app/public/images/rails.png +0 -0
- data/test_app/public/index.html +241 -0
- data/test_app/public/javascripts/application.js +2 -0
- data/test_app/public/javascripts/controls.js +965 -0
- data/test_app/public/javascripts/dragdrop.js +974 -0
- data/test_app/public/javascripts/effects.js +1123 -0
- data/test_app/public/javascripts/prototype.js +6001 -0
- data/test_app/public/javascripts/rails.js +175 -0
- data/test_app/public/robots.txt +5 -0
- data/test_app/public/stylesheets/.gitkeep +0 -0
- data/test_app/script/cucumber +10 -0
- data/test_app/script/rails +6 -0
- data/test_app/spec/controllers/controller_spec.rb +125 -0
- data/test_app/spec/controllers/impressionist_uniqueness_spec.rb +310 -0
- data/test_app/spec/fixtures/articles.yml +3 -0
- data/test_app/spec/fixtures/impressions.yml +43 -0
- data/test_app/spec/fixtures/posts.yml +3 -0
- data/test_app/spec/fixtures/widgets.yml +4 -0
- data/test_app/spec/intializers/initializers_spec.rb +18 -0
- data/test_app/spec/models/counter_caching_spec.rb +30 -0
- data/test_app/spec/models/model_spec.rb +94 -0
- data/test_app/spec/rails_generators/rails_generators_spec.rb +23 -0
- data/test_app/spec/spec_helper.rb +36 -0
- data/upgrade_migrations/version_0_3_0.rb +7 -7
- data/upgrade_migrations/version_0_4_0.rb +2 -2
- metadata +356 -99
- data/VERSION +0 -1
- data/config/routes.rb +0 -2
- data/lib/generators/impressionist/impressionist_generator.rb +0 -20
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
1.0.1
|
data/config/routes.rb
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
require 'rails/generators'
|
2
|
-
require 'rails/generators/migration'
|
3
|
-
|
4
|
-
class ImpressionistGenerator < Rails::Generators::Base
|
5
|
-
include Rails::Generators::Migration
|
6
|
-
source_root File.join(File.dirname(__FILE__), 'templates')
|
7
|
-
|
8
|
-
def self.next_migration_number(dirname)
|
9
|
-
sleep 1
|
10
|
-
if ActiveRecord::Base.timestamped_migrations
|
11
|
-
Time.now.utc.strftime("%Y%m%d%H%M%S")
|
12
|
-
else
|
13
|
-
"%.3d" % (current_migration_number(dirname) + 1)
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
def create_migration_file
|
18
|
-
migration_template 'create_impressions_table.rb', 'db/migrate/create_impressions_table.rb'
|
19
|
-
end
|
20
|
-
end
|