Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/motion/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@

App = Motion::Project::App

Bundler.require if Object.const_defined?(:Bundler)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only line I worry about - this includes the :default group, right? But some people don't want to call Bundler.require. Is this necessary for the Bundler.require :default, :spec to work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would anyone not want to call Bundler.require if the Bundler constant is defined?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but http://myronmars.to/n/dev-blog/2012/12/5-reasons-to-avoid-bundler-require are some reasons, I've heard a few people rant about it. You can't please everyone.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skimming over the post, I agree on the points, but they don't apply to RubyMotion since there is no dynamic require.


# Check for software updates.
system('/usr/bin/motion update --check')
if $?.exitstatus == 2
Expand Down Expand Up @@ -124,6 +126,7 @@
desc "Run the test/spec suite on the simulator"
task :simulator do
App.config.spec_mode = true
Bundler.require :default, :spec if Object.const_defined?(:Bundler)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also worried that people will have more groups, and that even assuming :default here could mess things up...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want more groups, you can still require them later from the Rakefile.

Rake::Task["simulator"].invoke
end

Expand Down