Skip to content

Commit

Permalink
Plumbing necessary for Rails-specific specs to pass for Dummy app
Browse files Browse the repository at this point in the history
  • Loading branch information
arvicco committed Jul 15, 2012
1 parent da4f022 commit a256ab5
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 21 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ tmtags

## PROJECT::GENERAL
coverage
config
data
rdoc
doc
Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ gemspec
# Gems used in bin scripts
gem 'getopt'

# jquery-rails is used by the dummy application
gem "jquery-rails"

# Platform-specific dependencies
gem 'sqlite3', '> 1.3.3', :platforms => [:ruby_18, :ruby_19] #:ruby
gem 'activerecord-jdbcsqlite3-adapter', '>= 1.2.2', :platforms => :jruby
Expand Down
27 changes: 27 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,37 @@ GEM
activesupport (3.2.6)
i18n (~> 0.6)
multi_json (~> 1.0)
addressable (2.2.8)
arel (3.0.2)
builder (3.0.0)
capybara (1.1.2)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
xpath (~> 0.1.4)
childprocess (0.3.3)
ffi (~> 1.0.6)
coderay (1.0.7)
combustion (0.3.2)
rails (>= 3.0.0)
thor (>= 0.14.6)
database_cleaner (0.8.0)
diff-lcs (1.1.3)
erubis (2.7.0)
ffi (1.0.11-java)
getopt (1.4.1)
hike (1.2.1)
i18n (0.6.0)
jdbc-sqlite3 (3.7.2)
journey (1.0.4)
jquery-rails (2.0.2)
railties (>= 3.2.0, < 5.0)
thor (~> 0.14)
json (1.7.3-java)
libwebsocket (0.1.4)
addressable
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
Expand All @@ -65,6 +81,7 @@ GEM
multi_json (1.3.6)
my_scripts (0.1.15)
bundler (>= 1.0.0)
nokogiri (1.5.5-java)
polyglot (0.3.3)
pry (0.9.9.6-java)
coderay (~> 1.0.5)
Expand Down Expand Up @@ -114,6 +131,12 @@ GEM
activesupport (>= 3.0)
railties (>= 3.0)
rspec (~> 2.10.0)
rubyzip (0.9.9)
selenium-webdriver (2.24.0)
childprocess (>= 0.2.5)
libwebsocket (~> 0.1.3)
multi_json (~> 1.0)
rubyzip
slop (2.4.4)
spoon (0.0.1)
sprockets (2.1.3)
Expand All @@ -130,18 +153,22 @@ GEM
polyglot (>= 0.3.1)
tzinfo (0.3.33)
xml-simple (1.1.1)
xpath (0.1.4)
nokogiri (~> 1.3)
yard (0.8.2.1)

PLATFORMS
java

DEPENDENCIES
activerecord-jdbcsqlite3-adapter (>= 1.2.2)
capybara
combustion
database_cleaner (>= 0.7.2)
getopt
ib-ruby!
jdbc-sqlite3 (>= 3.7.2)
jquery-rails
my_scripts
pry
pry-doc
Expand Down
3 changes: 2 additions & 1 deletion ib-ruby.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Gem::Specification.new do |gem|

# Files setup
versioned = `git ls-files -z`.split("\0")
gem.files = Dir['{bin,lib,man,spec,features,tasks}/**/*', 'db/migrate/**/*',
gem.files = Dir['{app,config,db,bin,lib,man,spec,features,tasks}/**/*',
'Rakefile', 'README*', 'LICENSE*',
'VERSION*', 'HISTORY*', '.gitignore'] & versioned
gem.executables = (Dir['bin/**/*'] & versioned).map { |file| File.basename(file) }
Expand All @@ -35,6 +35,7 @@ Gem::Specification.new do |gem|
gem.add_development_dependency 'my_scripts'
gem.add_development_dependency 'rails', '~> 3.2.3'
gem.add_development_dependency 'rspec-rails', '~> 2.10.1'
gem.add_development_dependency 'capybara'
gem.add_development_dependency 'combustion'
gem.add_development_dependency 'pry'
gem.add_development_dependency 'pry-doc'
Expand Down
4 changes: 0 additions & 4 deletions lib/ib/base_properties.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@ def self.define_property_methods name, body={}
proc { self[name].send "to_#{body[:get]}" }
when VALUES[name] # property is encoded
proc { VALUES[name][self[name]] }
#when respond_to?(:column_names) && column_names.include?(name.to_s)
# # noop, ActiveRecord will take care of it...
# p "#{name} => get noop"
# p respond_to?(:column_names) && column_names
else
proc { self[name] }
end
Expand Down
9 changes: 8 additions & 1 deletion lib/ib/engine.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module IB
class Engine < ::Rails::Engine
# isolate_namespace IB
isolate_namespace IB

#paths["app"] # => ["app"]
#paths["app/controllers"] # => ["app/controllers"]
Expand All @@ -14,6 +14,13 @@ class Engine < ::Rails::Engine
#paths["config/locales"] # => ["config/locales"]
#paths["config/routes"] # => ["config/routes.rb"]

config.generators do |gen|
gen.integration_tool :rspec
gen.test_framework :rspec
gen.helper_specs false
# gen.view_specs false
end

config.to_prepare do
end

Expand Down
14 changes: 0 additions & 14 deletions lib/ib_engine.rb

This file was deleted.

3 changes: 3 additions & 0 deletions lib/models/ib/underlying.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ module IB
class Underlying < IB::Model
include BaseProperties

attr_accessible :created_at, :updated_at
attr_protected :id

has_one :contract

prop :con_id, # Id of the Underlying Contract
Expand Down

0 comments on commit a256ab5

Please sign in to comment.