Skip to content

Commit

Permalink
added dummy app to make specs work with full rails stack
Browse files Browse the repository at this point in the history
ignored spec folder from beign included in final gem
  • Loading branch information
alextk committed Apr 3, 2012
1 parent bc04298 commit 7da6683
Show file tree
Hide file tree
Showing 41 changed files with 1,035 additions and 63 deletions.
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Jeweler::Tasks.new do |gem|
gem.email = "tkachev.alex@gmail.com"
gem.authors = ["Alex"]
# dependencies defined in Gemfile
gem.files.exclude 'spec/**/*'
end
Jeweler::RubygemsDotOrgTasks.new

Expand Down
9 changes: 0 additions & 9 deletions lib/rego-date-time-fields.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
#puts "load #{__FILE__}"
require 'rego-date-time-fields/active_record'
require 'rego-date-time-fields/type_caster'
require 'rego-date-time-fields/ruby_to_jquery_date_format_convertor'
require 'rego-date-time-fields/action_view'

#%w{active_record type_caster action_view ruby_to_jquery_date_format_convertor}.each do |file_name|
# require File.join(File.dirname(__FILE__), 'rego-date-time-fields', file_name)
#end

#module DateTimeFields
#
#end

require 'rego-date-time-fields/railtie' if defined?(Rails)
2 changes: 1 addition & 1 deletion lib/rego-date-time-fields/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module DateTimeFields
class Railtie < Rails::Railtie
initializer "gems.date_time_fields" do
::ActiveRecord::Base.send :extend, DateTimeFields::ActiveRecord::ClassMethods
::ActionView::Helpers::FormHelper.send :include, DateTimeFields::ActionView::FormOptionsHelper
::ActionView::Base.send :include, DateTimeFields::ActionView::FormOptionsHelper
::ActionView::Helpers::FormBuilder.send :include, DateTimeFields::ActionView::FormBuilder
end
end
Expand Down
18 changes: 1 addition & 17 deletions rego-date-time-fields.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,7 @@ Gem::Specification.new do |s|
"lib/rego-date-time-fields/railtie.rb",
"lib/rego-date-time-fields/ruby_to_jquery_date_format_convertor.rb",
"lib/rego-date-time-fields/type_caster.rb",
"rego-date-time-fields.gemspec",
"spec/factories.rb",
"spec/rego-date-time-fields/active_record_spec.rb",
"spec/rego-date-time-fields/date_field_spec.rb",
"spec/rego-date-time-fields/ruby_to_jquery_date_format_convertor_spec.rb",
"spec/rego-date-time-fields/time_field_spec.rb",
"spec/rego-date-time-fields/type_caster_spec.rb",
"spec/rego-date-time-fields_spec.rb",
"spec/resources/db/database.yml",
"spec/resources/db/schema.rb",
"spec/resources/db/schema_loader.rb",
"spec/resources/models/article.rb",
"spec/resources/models/sms.rb",
"spec/resources/views/sms_form_with_date.html.erb",
"spec/resources/views/sms_form_with_time.html.erb",
"spec/spec_helper.rb",
"spec/support/file_macros.rb"
"rego-date-time-fields.gemspec"
]
s.homepage = "http://github.com/alextk/rego-date-time-fields"
s.licenses = ["MIT"]
Expand Down
31 changes: 31 additions & 0 deletions spec/dummy_app/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
source 'http://rubygems.org'

gem 'rails', '3.0.9'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
# gem 'ruby-debug'
# gem 'ruby-debug19', :require => 'ruby-debug'

# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'

# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
# gem 'webrat'
# end
78 changes: 78 additions & 0 deletions spec/dummy_app/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
GEM
remote: http://rubygems.org/
specs:
abstract (1.0.0)
actionmailer (3.0.9)
actionpack (= 3.0.9)
mail (~> 2.2.19)
actionpack (3.0.9)
activemodel (= 3.0.9)
activesupport (= 3.0.9)
builder (~> 2.1.2)
erubis (~> 2.6.6)
i18n (~> 0.5.0)
rack (~> 1.2.1)
rack-mount (~> 0.6.14)
rack-test (~> 0.5.7)
tzinfo (~> 0.3.23)
activemodel (3.0.9)
activesupport (= 3.0.9)
builder (~> 2.1.2)
i18n (~> 0.5.0)
activerecord (3.0.9)
activemodel (= 3.0.9)
activesupport (= 3.0.9)
arel (~> 2.0.10)
tzinfo (~> 0.3.23)
activeresource (3.0.9)
activemodel (= 3.0.9)
activesupport (= 3.0.9)
activesupport (3.0.9)
arel (2.0.10)
builder (2.1.2)
erubis (2.6.6)
abstract (>= 1.0.0)
i18n (0.5.0)
json (1.6.6)
mail (2.2.19)
activesupport (>= 2.3.6)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.18)
polyglot (0.3.3)
rack (1.2.5)
rack-mount (0.6.14)
rack (>= 1.0.0)
rack-test (0.5.7)
rack (>= 1.0)
rails (3.0.9)
actionmailer (= 3.0.9)
actionpack (= 3.0.9)
activerecord (= 3.0.9)
activeresource (= 3.0.9)
activesupport (= 3.0.9)
bundler (~> 1.0)
railties (= 3.0.9)
railties (3.0.9)
actionpack (= 3.0.9)
activesupport (= 3.0.9)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.4)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
sqlite3 (1.3.5)
thor (0.14.6)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.32)

PLATFORMS
ruby

DEPENDENCIES
rails (= 3.0.9)
sqlite3
Loading

0 comments on commit 7da6683

Please sign in to comment.