ryb 0.0.0.dev

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 11238b9bd67d96a08c7072c8466245cb5962a906
4
+ data.tar.gz: 882540d98d5604fd3c3b3e967483da36ffba608a
5
+ SHA512:
6
+ metadata.gz: 50fd33ff6112e58b1af4e86da90572fad5d10a2e45d9b7e39996c886e2d67d006de5e41e5414013c98883a7243794716fbc3390408c9aa87355ab8357b8973e1
7
+ data.tar.gz: 1edc20f2bcd3c0038b11940d1ebb8dc2c9db92c528eb81001c5510892180e2f26449a2e042fd983ec7d8f278add66a5f60e0770f671e3c83981267e1f1c893dd
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source 'https://rubygems.org'
2
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,19 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ ryb (0.1.0.dev)
5
+ gli
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ gli (2.13.1)
11
+
12
+ PLATFORMS
13
+ ruby
14
+
15
+ DEPENDENCIES
16
+ ryb!
17
+
18
+ BUNDLED WITH
19
+ 1.10.5
data/README.md ADDED
@@ -0,0 +1 @@
1
+ # Rubify Your Builds
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
data/bin/ryb ADDED
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env ruby
2
+ $:.push File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
3
+
4
+ require 'rubygems'
5
+
6
+ require 'gli'
7
+ require 'ryb'
8
+ # TODO(mtwilliams): Refactor into Ryb::CLI/Ryb::Runner.
9
+ # require 'ryb/cli'
10
+
11
+ include GLI::App
12
+
13
+ # TODO(mtwilliams): Refactor this ugliness into lib/ryb.rb?
14
+ spec = Gem::Specification::load(File.expand_path(File.join(File.dirname(__FILE__), '..', 'ryb.gemspec')))
15
+ # program_name spec.name
16
+ version spec.version.to_s
17
+ program_desc spec.summary
18
+ program_long_desc spec.description
19
+
20
+ desc 'Generate project file(s)'
21
+ # TODO(mtwilliams): Improve command-specific help.
22
+ long_desc 'Generates project files for a specific toolset based on a Rybfile.'
23
+ command [:g, :gen, :generate] do |c|
24
+ c.desc 'Automatically regenerate project file(s)'
25
+
26
+ c.action do |global_opts, opts, args|
27
+ # TODO(mtwilliams): Sanity checks on `args'.
28
+ toolset = args.shift
29
+ # TODO(mtwilliams): Custom exception types.
30
+ raise "Unknown toolset `#{toolset}'!" unless Ryb::Toolsets.available?(toolset)
31
+ puts "Generating project file(s) for `#{toolset}'..."
32
+ # ...
33
+ end
34
+ end
35
+
36
+ exit run(ARGV)
data/lib/ryb/dsl.rb ADDED
@@ -0,0 +1,19 @@
1
+ module Ryb
2
+ module DSL
3
+ # TODO(mtwilliams): Refactor into Ryb::Runner? Ryb::Builder?
4
+ @_on_project_callbacks = []
5
+ def on_project(&block); @_on_project_callbacks << block; end
6
+
7
+ def project(name=nil, opts={}, &block)
8
+ # TODO(mtwilliams): Freak out if a name is not specified.
9
+ # TODO(mtwilliams): Freak out if `opts` is malformed, i.e. an unknown
10
+ # option is specified or a specified option is invalid.
11
+ project = Docile.dsl_eval(Ryb::Project::Builder.new, &block).build
12
+
13
+ # TODO(mtwilliams): Handle exceptions.
14
+ @_on_project_callbacks.each {|callback| callback(project)}
15
+
16
+ return project
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,17 @@
1
+ module Ryb
2
+ module Toolsets
3
+ AVAILABLE = %w{gmake vs2008 vs2010 vs2012 vs2013 vs2015}
4
+ def self.available?(toolset)
5
+ AVAILABLE.include?(toolset)
6
+ end
7
+ end
8
+
9
+ def self.generate_project_files(toolset, projects)
10
+ # ({:gmake => Ryb::GMake.generate_project_files,
11
+ # :vs2008 => Ryb::VS2008.generate_project_files,
12
+ # :vs2010 => Ryb::VS2010.generate_project_files,
13
+ # :vs2012 => Ryb::VS2012.generate_project_files,
14
+ # :vs2013 => Ryb::VS2013.generate_project_files,
15
+ # :vs2015 => Ryb::VS2015.generate_project_files}[toolset](projects))
16
+ end
17
+ end
@@ -0,0 +1,10 @@
1
+ module Ryb
2
+ module VERSION #:nodoc:
3
+ MAJOR, MINOR, PATCH, PRE = [0, 0, 0, 'dev']
4
+ STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.')
5
+ end
6
+
7
+ def self.version
8
+ Ryb::VERSION::STRING
9
+ end
10
+ end
data/lib/ryb.rb ADDED
@@ -0,0 +1,9 @@
1
+ require 'ryb/version'
2
+
3
+ require 'ryb/project'
4
+ require 'ryb/project_builder'
5
+ require 'ryb/project_validator'
6
+
7
+ require 'ryb/toolsets'
8
+
9
+ require 'ryb/dsl'
data/ryb.gemspec ADDED
@@ -0,0 +1,24 @@
1
+ $:.push File.expand_path(File.join(File.dirname(__FILE__), 'lib'))
2
+ require 'ryb/version'
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = 'ryb'
6
+ s.version = Ryb.version
7
+ s.platform = Gem::Platform::RUBY
8
+ s.author = 'Michael Williams'
9
+ s.email = 'm.t.williams@live.com'
10
+ s.homepage = 'https://RubifyYourBuild.com/'
11
+ s.summary = 'Rubify Your Build!'
12
+ s.description = 'Ryb is a clean and extensible Ruby DSL for generating project files.'
13
+ s.license = 'Public Domain'
14
+
15
+ s.required_ruby_version = '>= 1.9.3'
16
+
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
+ # TODO(mtwilliams): Handle this gracefuly in `bin/ryb'.
21
+ s.require_paths = %w(lib)
22
+
23
+ s.add_dependency 'gli'
24
+ end
metadata ADDED
@@ -0,0 +1,69 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ryb
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0.dev
5
+ platform: ruby
6
+ authors:
7
+ - Michael Williams
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-07-05 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: gli
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: Ryb is a clean and extensible Ruby DSL for generating project files.
28
+ email: m.t.williams@live.com
29
+ executables:
30
+ - ryb
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - Gemfile
35
+ - Gemfile.lock
36
+ - README.md
37
+ - Rakefile
38
+ - bin/ryb
39
+ - lib/ryb.rb
40
+ - lib/ryb/dsl.rb
41
+ - lib/ryb/toolsets.rb
42
+ - lib/ryb/version.rb
43
+ - ryb.gemspec
44
+ homepage: https://RubifyYourBuild.com/
45
+ licenses:
46
+ - Public Domain
47
+ metadata: {}
48
+ post_install_message:
49
+ rdoc_options: []
50
+ require_paths:
51
+ - lib
52
+ required_ruby_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: 1.9.3
57
+ required_rubygems_version: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">"
60
+ - !ruby/object:Gem::Version
61
+ version: 1.3.1
62
+ requirements: []
63
+ rubyforge_project:
64
+ rubygems_version: 2.4.8
65
+ signing_key:
66
+ specification_version: 4
67
+ summary: Rubify Your Build!
68
+ test_files: []
69
+ has_rdoc: