diff --git a/Gemfile b/Gemfile index a4ea8d7..0208162 100644 --- a/Gemfile +++ b/Gemfile @@ -1,40 +1,21 @@ require File.expand_path('require_gemfile', File.dirname(__FILE__)) require_gemfile "sources.gemfile" -source 'https://rubygems.org' -# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '4.0.10' - -# Use sqlite3 as the database for Active Record gem 'sqlite3' - -# Use SCSS for stylesheets gem 'sass-rails', '~> 4.0.2' - -# Use Uglifier as compressor for JavaScript assets gem 'uglifier', '>= 1.3.0' - -# Use CoffeeScript for .js.coffee assets and views gem 'coffee-rails', '~> 4.0.0' - -# See https://github.com/sstephenson/execjs#readme for more supported runtimes -# gem 'therubyracer', platforms: :ruby - -# Use jquery as the JavaScript library gem 'jquery-rails' - -# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks gem 'turbolinks' - -# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 1.2' +# Project local gems gem 'blorgh' gem 'lorde' group :doc do - # bundle exec rake doc:rails generates the API under doc/api. gem 'sdoc', require: false end @@ -42,15 +23,3 @@ group :test do gem 'test_utils', path: 'gems' gem 'shoulda', git: 'https://github.com/thoughtbot/shoulda', branch: 'ew-update-shoulda-matchers-in-readme' end - -# Use ActiveModel has_secure_password -# gem 'bcrypt', '~> 3.1.7' - -# Use unicorn as the app server -# gem 'unicorn' - -# Use Capistrano for deployment -# gem 'capistrano', group: :development - -# Use debugger -# gem 'debugger', group: [:development, :test] diff --git a/Gemfile.lock b/Gemfile.lock index 9ea58c1..7bb08b4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -16,9 +16,15 @@ PATH throrg lorde (0.0.1) rails (~> 4.0.10) + yayaya throrg (0.0.1) rails (~> 4.0.10) +PATH + remote: engines/lorde/gems + specs: + yayaya (0.0.1) + PATH remote: gems specs: diff --git a/engines/blorgh/Gemfile b/engines/blorgh/Gemfile index 3925148..5916a75 100644 --- a/engines/blorgh/Gemfile +++ b/engines/blorgh/Gemfile @@ -1,20 +1,9 @@ require "../../require_gemfile" require_gemfile "../../sources.gemfile" -source "https://rubygems.org" -# Declare your gem's dependencies in blorgh.gemspec. -# Bundler will treat runtime dependencies like base dependencies, and -# development dependencies will be added by default to the :development group. gemspec gem 'test_utils' gem 'shoulda', git: 'https://github.com/thoughtbot/shoulda', branch: 'ew-update-shoulda-matchers-in-readme' -# Declare any dependencies that are still in development here instead of in -# your gemspec. These might include edge Rails or gems from your path or -# Git. Remember to move these dependencies to your gemspec before releasing -# your gem to rubygems.org. - -# To use debugger -# gem 'debugger' diff --git a/engines/blorgh/Gemfile.lock b/engines/blorgh/Gemfile.lock index e2a75b0..c5ed7ae 100644 --- a/engines/blorgh/Gemfile.lock +++ b/engines/blorgh/Gemfile.lock @@ -20,6 +20,7 @@ PATH specs: lorde (0.0.1) rails (~> 4.0.10) + yayaya throrg (0.0.1) rails (~> 4.0.10) @@ -29,6 +30,11 @@ PATH test_utils (0.0.1) shoulda (~> 3.5) +PATH + remote: ../lorde/gems + specs: + yayaya (0.0.1) + GEM remote: https://rubygems.org/ specs: diff --git a/engines/lorde/Gemfile b/engines/lorde/Gemfile index 0e07291..232ab43 100644 --- a/engines/lorde/Gemfile +++ b/engines/lorde/Gemfile @@ -1,20 +1,8 @@ require "../../require_gemfile" -require_gemfile "../../sources.gemfile" -source "https://rubygems.org" +require_gemfile "sources.gemfile" -# Declare your gem's dependencies in lorde.gemspec. -# Bundler will treat runtime dependencies like base dependencies, and -# development dependencies will be added by default to the :development group. gemspec gem 'test_utils' gem 'shoulda', git: 'https://github.com/thoughtbot/shoulda', branch: 'ew-update-shoulda-matchers-in-readme' - -# Declare any dependencies that are still in development here instead of in -# your gemspec. These might include edge Rails or gems from your path or -# Git. Remember to move these dependencies to your gemspec before releasing -# your gem to rubygems.org. - -# To use debugger -# gem 'debugger' diff --git a/engines/lorde/Gemfile.lock b/engines/lorde/Gemfile.lock index f435e2b..e191d98 100644 --- a/engines/lorde/Gemfile.lock +++ b/engines/lorde/Gemfile.lock @@ -12,6 +12,7 @@ PATH specs: lorde (0.0.1) rails (~> 4.0.10) + yayaya PATH remote: .. @@ -23,6 +24,11 @@ PATH test_utils (0.0.1) shoulda (~> 3.5) +PATH + remote: gems + specs: + yayaya (0.0.1) + GEM remote: https://rubygems.org/ specs: diff --git a/engines/lorde/gems/yayaya/.gitignore b/engines/lorde/gems/yayaya/.gitignore new file mode 100644 index 0000000..8f994bd --- /dev/null +++ b/engines/lorde/gems/yayaya/.gitignore @@ -0,0 +1,16 @@ +*.gem +*.rbc +.bundle +.config +.yardoc +InstalledFiles +_yardoc +coverage +doc/ +lib/bundler/man +pkg +rdoc +spec/reports +test/tmp +test/version_tmp +tmp diff --git a/engines/lorde/gems/yayaya/Gemfile b/engines/lorde/gems/yayaya/Gemfile new file mode 100644 index 0000000..7723acb --- /dev/null +++ b/engines/lorde/gems/yayaya/Gemfile @@ -0,0 +1,5 @@ +require '../../../../require_gemfile' + +require_gemfile "../../sources.gemfile" + +gemspec diff --git a/engines/lorde/gems/yayaya/Gemfile.lock b/engines/lorde/gems/yayaya/Gemfile.lock new file mode 100644 index 0000000..82e142a --- /dev/null +++ b/engines/lorde/gems/yayaya/Gemfile.lock @@ -0,0 +1,29 @@ +PATH + remote: . + specs: + yayaya (0.0.1) + +PATH + remote: .. + specs: + +PATH + remote: ../../.. + specs: + +PATH + remote: ../../../../gems + specs: + +GEM + remote: https://rubygems.org/ + specs: + rake (10.3.2) + +PLATFORMS + ruby + +DEPENDENCIES + bundler (~> 1.3) + rake + yayaya! diff --git a/engines/lorde/gems/yayaya/LICENSE.txt b/engines/lorde/gems/yayaya/LICENSE.txt new file mode 100644 index 0000000..8f4005e --- /dev/null +++ b/engines/lorde/gems/yayaya/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright (c) 2014 Donnie Tognazzini + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/engines/lorde/gems/yayaya/README.md b/engines/lorde/gems/yayaya/README.md new file mode 100644 index 0000000..72dd2fa --- /dev/null +++ b/engines/lorde/gems/yayaya/README.md @@ -0,0 +1,29 @@ +# Yayaya + +TODO: Write a gem description + +## Installation + +Add this line to your application's Gemfile: + + gem 'yayaya' + +And then execute: + + $ bundle + +Or install it yourself as: + + $ gem install yayaya + +## Usage + +TODO: Write usage instructions here + +## Contributing + +1. Fork it +2. Create your feature branch (`git checkout -b my-new-feature`) +3. Commit your changes (`git commit -am 'Add some feature'`) +4. Push to the branch (`git push origin my-new-feature`) +5. Create new Pull Request diff --git a/engines/lorde/gems/yayaya/Rakefile b/engines/lorde/gems/yayaya/Rakefile new file mode 100644 index 0000000..2995527 --- /dev/null +++ b/engines/lorde/gems/yayaya/Rakefile @@ -0,0 +1 @@ +require "bundler/gem_tasks" diff --git a/engines/lorde/gems/yayaya/lib/yayaya.rb b/engines/lorde/gems/yayaya/lib/yayaya.rb new file mode 100644 index 0000000..cc84f37 --- /dev/null +++ b/engines/lorde/gems/yayaya/lib/yayaya.rb @@ -0,0 +1,5 @@ +require "yayaya/version" + +module Yayaya + # Your code goes here... +end diff --git a/engines/lorde/gems/yayaya/lib/yayaya/version.rb b/engines/lorde/gems/yayaya/lib/yayaya/version.rb new file mode 100644 index 0000000..aef0e3d --- /dev/null +++ b/engines/lorde/gems/yayaya/lib/yayaya/version.rb @@ -0,0 +1,3 @@ +module Yayaya + VERSION = "0.0.1" +end diff --git a/engines/lorde/gems/yayaya/yayaya.gemspec b/engines/lorde/gems/yayaya/yayaya.gemspec new file mode 100644 index 0000000..2afe0d7 --- /dev/null +++ b/engines/lorde/gems/yayaya/yayaya.gemspec @@ -0,0 +1,23 @@ +# coding: utf-8 +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) +require 'yayaya/version' + +Gem::Specification.new do |spec| + spec.name = "yayaya" + spec.version = Yayaya::VERSION + spec.authors = ["yayaya"] + spec.email = ["yayaya"] + spec.description = %q{Write a gem description} + spec.summary = %q{Write a gem summary} + spec.homepage = "" + spec.license = "MIT" + + spec.files = `git ls-files`.split($/) + spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } + spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) + spec.require_paths = ["lib"] + + spec.add_development_dependency "bundler", "~> 1.3" + spec.add_development_dependency "rake" +end diff --git a/engines/lorde/lorde.gemspec b/engines/lorde/lorde.gemspec index 69f923e..b094f7f 100644 --- a/engines/lorde/lorde.gemspec +++ b/engines/lorde/lorde.gemspec @@ -16,6 +16,7 @@ Gem::Specification.new do |s| s.test_files = Dir["test/**/*"] s.add_dependency "rails", "~> 4.0.10" + s.add_dependency "yayaya" s.add_development_dependency "sqlite3" end diff --git a/engines/lorde/paths.gemfile b/engines/lorde/paths.gemfile new file mode 100644 index 0000000..fec1f01 --- /dev/null +++ b/engines/lorde/paths.gemfile @@ -0,0 +1,8 @@ +# Declares the gem paths for gems internal to lorde. Consumers of lorde can +# require this file and be assured that all of the internal gems comprising +# the lorde gem can be found. For now, the lorde gem is only composed of a single +# gem (yayaya) under the gems/ directory. In the future, yayaya itself could be +# further decomposed. When that happens, this file would be updated require +# yayaya's path.gemfile + +path "gems" diff --git a/engines/lorde/sources.gemfile b/engines/lorde/sources.gemfile new file mode 100644 index 0000000..c63e174 --- /dev/null +++ b/engines/lorde/sources.gemfile @@ -0,0 +1,6 @@ +# Declares the external sources used to resolve gems used by lorde gem and all lorde sub gems. + +require_gemfile "../../sources.gemfile" + +# This file is only necessary because lorde has an internal sub gem (yayaya) which will pull in this file. + diff --git a/engines/throrg/Gemfile b/engines/throrg/Gemfile index 89847bd..9aea575 100644 --- a/engines/throrg/Gemfile +++ b/engines/throrg/Gemfile @@ -1,20 +1,8 @@ require "../../require_gemfile" require_gemfile "../../sources.gemfile" -source "https://rubygems.org" -# Declare your gem's dependencies in throrg.gemspec. -# Bundler will treat runtime dependencies like base dependencies, and -# development dependencies will be added by default to the :development group. gemspec gem 'test_utils' gem 'shoulda', git: 'https://github.com/thoughtbot/shoulda', branch: 'ew-update-shoulda-matchers-in-readme' - -# Declare any dependencies that are still in development here instead of in -# your gemspec. These might include edge Rails or gems from your path or -# Git. Remember to move these dependencies to your gemspec before releasing -# your gem to rubygems.org. - -# To use debugger -# gem 'debugger' diff --git a/engines/throrg/Gemfile.lock b/engines/throrg/Gemfile.lock index fc701cd..8e49140 100644 --- a/engines/throrg/Gemfile.lock +++ b/engines/throrg/Gemfile.lock @@ -23,6 +23,10 @@ PATH test_utils (0.0.1) shoulda (~> 3.5) +PATH + remote: ../lorde/gems + specs: + GEM remote: https://rubygems.org/ specs: diff --git a/gems/test_utils/Gemfile b/gems/test_utils/Gemfile index 889e777..32e1692 100644 --- a/gems/test_utils/Gemfile +++ b/gems/test_utils/Gemfile @@ -1,9 +1,7 @@ require "../../require_gemfile" require_gemfile "../../sources.gemfile" -source 'https://rubygems.org' -# Specify your gem's dependencies in test_utils.gemspec gemspec gem 'shoulda', git: 'https://github.com/thoughtbot/shoulda', branch: 'ew-update-shoulda-matchers-in-readme' diff --git a/gems/test_utils/Gemfile.lock b/gems/test_utils/Gemfile.lock index 5541b61..55c0f43 100644 --- a/gems/test_utils/Gemfile.lock +++ b/gems/test_utils/Gemfile.lock @@ -21,6 +21,10 @@ PATH remote: ../../engines specs: +PATH + remote: ../../engines/lorde/gems + specs: + GEM remote: https://rubygems.org/ specs: diff --git a/require_gemfile.rb b/require_gemfile.rb index 00b9b92..d89f624 100644 --- a/require_gemfile.rb +++ b/require_gemfile.rb @@ -40,6 +40,12 @@ def merge(other_file, gemfile_path) end end + rubygems_source = other_file.instance_variable_get(:@rubygems_source) + if rubygems_source + rubygems_source.remotes.each do |remote| + @rubygems_source.add_remote(remote) + end + end end protected diff --git a/sources.gemfile b/sources.gemfile index a3ef0e1..07538b3 100644 --- a/sources.gemfile +++ b/sources.gemfile @@ -1,8 +1,23 @@ -# This file contains all of the sources for all of the Gemfiles used in this project. +# The project depends on lorde and blorgh per the Gemfile. lorde has internal gems; blorgh does not. + +# We pull in a paths.gemfile for sourcing the gems internal to lorde. lorde can be +# decomposed later into more internal gems. So long as its paths.gemfile is updated +# with where to find its internal gems, this file, at the project level does not need to be updated. + +require_gemfile "engines/lorde/paths.gemfile" + + +# lorde and blorgh may depend on other gems/engines that are not direct dependencies +# of the project. The project includes paths to the project-global gem sources so that +# these can be resolved. For example, blorgh depends on throrg. The project doesn't +# need to know this, but the dependency still needs to be resolved. The project uses +# the gems/ and engines/ directories for top level subsystems. path "gems" path "engines" -# source 'https://myprivategemserver.net' -# I would move this into here as well, but the hack implementation doesn't support source() -# source "https://rubygems.org" + +# Finally, external gem sources are declared to resolve gems external to the project. + +# source 'https://myprivategemserver.net' +source "https://rubygems.org"