ryb 0.1.3.1 → 0.2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +36 -47
  3. data/NOTES +0 -0
  4. data/README.md +3 -1
  5. data/TODO +4 -0
  6. data/bin/ryb +2 -42
  7. data/lib/ryb.rb +31 -20
  8. data/lib/ryb/cli.rb +103 -0
  9. data/lib/ryb/code.rb +7 -0
  10. data/lib/ryb/configuration.rb +18 -12
  11. data/lib/ryb/configurations.rb +9 -0
  12. data/lib/ryb/dependencies.rb +7 -0
  13. data/lib/ryb/dependency.rb +30 -0
  14. data/lib/ryb/dsl.rb +280 -0
  15. data/lib/ryb/environment.rb +9 -0
  16. data/lib/ryb/flags.rb +17 -0
  17. data/lib/ryb/gem.rb +58 -0
  18. data/lib/ryb/helpers/defaults.rb +26 -0
  19. data/lib/ryb/helpers/pretty_string.rb +47 -0
  20. data/lib/ryb/languages.rb +13 -0
  21. data/lib/ryb/name.rb +3 -5
  22. data/lib/ryb/ninja.rb +257 -200
  23. data/lib/ryb/paths.rb +7 -0
  24. data/lib/ryb/preprocessor.rb +10 -0
  25. data/lib/ryb/product.rb +31 -0
  26. data/lib/ryb/project.rb +6 -29
  27. data/lib/ryb/source_file.rb +62 -0
  28. data/lib/ryb/visual_studio.rb +93 -57
  29. data/lib/rybfile.rb +30 -10
  30. data/lib/rybfile/walker.rb +202 -0
  31. data/lib/yb.rb +4 -0
  32. data/lib/ybfile.rb +3 -0
  33. data/ryb.gemspec +18 -13
  34. data/ryb.sublime-project +18 -17
  35. metadata +45 -31
  36. data/lib/ryb/application.rb +0 -24
  37. data/lib/ryb/architecture.rb +0 -16
  38. data/lib/ryb/architectures/x86.rb +0 -11
  39. data/lib/ryb/architectures/x86_64.rb +0 -11
  40. data/lib/ryb/library.rb +0 -29
  41. data/lib/ryb/properties.rb +0 -10
  42. data/lib/ryb/properties/architectures.rb +0 -32
  43. data/lib/ryb/properties/configurations.rb +0 -29
  44. data/lib/ryb/properties/defines.rb +0 -31
  45. data/lib/ryb/properties/dependencies.rb +0 -23
  46. data/lib/ryb/properties/files.rb +0 -25
  47. data/lib/ryb/properties/flags.rb +0 -33
  48. data/lib/ryb/properties/named.rb +0 -17
  49. data/lib/ryb/properties/paths.rb +0 -37
  50. data/lib/ryb/properties/suffix.rb +0 -17
  51. data/lib/ryb/properties/targets.rb +0 -36
  52. data/lib/ryb/target.rb +0 -16
  53. data/lib/ryb/targets/linux.rb +0 -11
  54. data/lib/ryb/targets/macosx.rb +0 -33
  55. data/lib/ryb/targets/windows.rb +0 -13
  56. data/lib/ryb/version.rb +0 -11
  57. data/lib/ryb/windows.rb +0 -40
  58. data/lib/ryb/xcode.rb +0 -145
@@ -0,0 +1,4 @@
1
+ # This is clever hack to let users require Ryb by specifing what looks like an
2
+ # offical command line flag to the Ruby command line: `ruby -ryb Rybfile`.
3
+
4
+ require 'ryb'
@@ -0,0 +1,3 @@
1
+ # Refer to lib/yb.rb
2
+
3
+ require 'rybfile'
@@ -1,29 +1,34 @@
1
1
  $:.push File.expand_path(File.join(File.dirname(__FILE__), 'lib'))
2
- require 'ryb/version'
2
+ require 'ryb/gem'
3
3
 
4
4
  Gem::Specification.new do |s|
5
- s.name = 'ryb'
6
- s.version = Ryb.version
5
+ s.name = Ryb::Gem.name
6
+ s.version = Ryb::Gem.version
7
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'
8
+ s.author = Ryb::Gem.author.name
9
+ s.email = Ryb::Gem.author.email
10
+ s.homepage = Ryb::Gem.homepage
11
+ s.summary = Ryb::Gem.summary
12
+ s.description = Ryb::Gem.description
13
+ s.license = Ryb::Gem.license
14
14
 
15
15
  s.required_ruby_version = '>= 1.9.3'
16
16
 
17
17
  s.files = `git ls-files`.split("\n")
18
18
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
- # TODO(mtwilliams): Handle this gracefuly in `bin/ryb'.
21
20
  s.require_paths = %w(lib)
22
21
 
23
- s.add_dependency 'facets'
24
- s.add_dependency 'gli'
25
- s.add_dependency 'xcodeproj'
22
+ s.add_dependency 'gli', '~> 2'
23
+
24
+ s.add_dependency 'hashie'
25
+ s.add_dependency 'pour'
26
+ # s.add_dependency 'pidgin'
27
+
28
+ s.add_dependency 'visual_studio'
29
+ # s.add_dependency 'xcode4'
26
30
  s.add_dependency 'ninja-gen'
31
+ # s.add_dependency 'gmake'
27
32
 
28
33
  s.add_development_dependency 'rspec'
29
34
  s.add_development_dependency 'cucumber'
@@ -1,19 +1,20 @@
1
1
  {
2
- "folders":
3
- [
4
- {
5
- "path": ".",
6
-
7
- "file_exclude_patterns": [
8
- "*.sublime-project",
9
- "*.sublime-workspace",
10
- "Gemfile.lock",
11
- "*.gem"
12
- ],
13
-
14
- "folder_exclude_patterns": [
15
- ".bundle"
16
- ]
17
- }
18
- ]
2
+ "folders":
3
+ [
4
+ {
5
+ "file_exclude_patterns":
6
+ [
7
+ "*.sublime-project",
8
+ "*.sublime-workspace",
9
+ "Gemfile.lock",
10
+ "*.gem"
11
+ ],
12
+ "folder_exclude_patterns":
13
+ [
14
+ ".bundle",
15
+ "pkg"
16
+ ],
17
+ "path": "."
18
+ }
19
+ ]
19
20
  }
metadata CHANGED
@@ -1,17 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ryb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3.1
4
+ version: 0.2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-18 00:00:00.000000000 Z
11
+ date: 2016-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: facets
14
+ name: gli
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: hashie
15
29
  requirement: !ruby/object:Gem::Requirement
16
30
  requirements:
17
31
  - - ">="
@@ -25,7 +39,7 @@ dependencies:
25
39
  - !ruby/object:Gem::Version
26
40
  version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
- name: gli
42
+ name: pour
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
45
  - - ">="
@@ -39,7 +53,7 @@ dependencies:
39
53
  - !ruby/object:Gem::Version
40
54
  version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
- name: xcodeproj
56
+ name: visual_studio
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
59
  - - ">="
@@ -108,7 +122,8 @@ dependencies:
108
122
  - - ">="
109
123
  - !ruby/object:Gem::Version
110
124
  version: '0'
111
- description: Ryb is a clean and extensible Ruby DSL for generating project files.
125
+ description: Ryb is a clean and extensible Ruby library and tool that generates build
126
+ files for Visual Studio, XCode, Make, and Ninja.
112
127
  email: m.t.williams@live.com
113
128
  executables:
114
129
  - ryb
@@ -118,42 +133,40 @@ files:
118
133
  - ".gitignore"
119
134
  - Gemfile
120
135
  - Gemfile.lock
136
+ - NOTES
121
137
  - README.md
122
138
  - Rakefile
139
+ - TODO
123
140
  - bin/ryb
124
141
  - lib/ryb.rb
125
- - lib/ryb/application.rb
126
- - lib/ryb/architecture.rb
127
- - lib/ryb/architectures/x86.rb
128
- - lib/ryb/architectures/x86_64.rb
142
+ - lib/ryb/cli.rb
143
+ - lib/ryb/code.rb
129
144
  - lib/ryb/configuration.rb
130
- - lib/ryb/library.rb
145
+ - lib/ryb/configurations.rb
146
+ - lib/ryb/dependencies.rb
147
+ - lib/ryb/dependency.rb
148
+ - lib/ryb/dsl.rb
149
+ - lib/ryb/environment.rb
150
+ - lib/ryb/flags.rb
151
+ - lib/ryb/gem.rb
152
+ - lib/ryb/helpers/defaults.rb
153
+ - lib/ryb/helpers/pretty_string.rb
154
+ - lib/ryb/languages.rb
131
155
  - lib/ryb/name.rb
132
156
  - lib/ryb/ninja.rb
157
+ - lib/ryb/paths.rb
158
+ - lib/ryb/preprocessor.rb
159
+ - lib/ryb/product.rb
133
160
  - lib/ryb/project.rb
134
- - lib/ryb/properties.rb
135
- - lib/ryb/properties/architectures.rb
136
- - lib/ryb/properties/configurations.rb
137
- - lib/ryb/properties/defines.rb
138
- - lib/ryb/properties/dependencies.rb
139
- - lib/ryb/properties/files.rb
140
- - lib/ryb/properties/flags.rb
141
- - lib/ryb/properties/named.rb
142
- - lib/ryb/properties/paths.rb
143
- - lib/ryb/properties/suffix.rb
144
- - lib/ryb/properties/targets.rb
145
- - lib/ryb/target.rb
146
- - lib/ryb/targets/linux.rb
147
- - lib/ryb/targets/macosx.rb
148
- - lib/ryb/targets/windows.rb
149
- - lib/ryb/version.rb
161
+ - lib/ryb/source_file.rb
150
162
  - lib/ryb/visual_studio.rb
151
- - lib/ryb/windows.rb
152
- - lib/ryb/xcode.rb
153
163
  - lib/rybfile.rb
164
+ - lib/rybfile/walker.rb
165
+ - lib/yb.rb
166
+ - lib/ybfile.rb
154
167
  - ryb.gemspec
155
168
  - ryb.sublime-project
156
- homepage: https://RubifyYourBuild.com/
169
+ homepage: https://RubifiyYourBuild.com/
157
170
  licenses:
158
171
  - Public Domain
159
172
  metadata: {}
@@ -176,5 +189,6 @@ rubyforge_project:
176
189
  rubygems_version: 2.4.5
177
190
  signing_key:
178
191
  specification_version: 4
179
- summary: Rubify Your Build!
192
+ summary: Rubifiy your builds!
180
193
  test_files: []
194
+ has_rdoc:
@@ -1,24 +0,0 @@
1
- require 'ryb/name'
2
- require 'ryb/properties'
3
-
4
- require 'ryb/architecture'
5
- require 'ryb/configuration'
6
-
7
- module Ryb
8
- class Application
9
- include Properties::Named
10
- include Properties::Defines
11
- include Properties::Flags
12
- include Properties::Paths
13
- include Properties::Files
14
- include Properties::Dependencies
15
- include Properties::Architectures
16
- include Properties::Targets
17
- include Properties::Configurations
18
-
19
- def initialize(name, opts={})
20
- @name = Name.new(name, opts[:pretty])
21
- yield self if block_given?
22
- end
23
- end
24
- end
@@ -1,16 +0,0 @@
1
- require 'ryb/name'
2
- require 'ryb/properties'
3
-
4
- module Ryb
5
- class Architecture
6
- include Properties::Named
7
- include Properties::Suffix
8
- include Properties::Defines
9
- include Properties::Flags
10
-
11
- def initialize(name, opts={})
12
- @name = Name.new(name, opts[:pretty])
13
- yield self if block_given?
14
- end
15
- end
16
- end
@@ -1,11 +0,0 @@
1
- require 'ryb/architecture'
2
-
3
- module Ryb
4
- module Architectures
5
- class X86 < Architecture
6
- def initialize(&block)
7
- super('x86', pretty: 'x86', &block)
8
- end
9
- end
10
- end
11
- end
@@ -1,11 +0,0 @@
1
- require 'ryb/architecture'
2
-
3
- module Ryb
4
- module Architectures
5
- class X86_64 < Architecture
6
- def initialize(&block)
7
- super('x86_64', pretty: 'x86_64', &block)
8
- end
9
- end
10
- end
11
- end
@@ -1,29 +0,0 @@
1
- require 'ryb/name'
2
- require 'ryb/properties'
3
-
4
- require 'ryb/architecture'
5
- require 'ryb/configuration'
6
-
7
- module Ryb
8
- class Library
9
- include Properties::Named
10
- include Properties::Defines
11
- include Properties::Flags
12
- include Properties::Paths
13
- include Properties::Files
14
- include Properties::Dependencies
15
- include Properties::Architectures
16
- include Properties::Targets
17
- include Properties::Configurations
18
-
19
- def initialize(name, opts={})
20
- @name = Name.new(name, opts[:pretty])
21
- yield self if block_given?
22
- end
23
-
24
- def linkage; @linkage ||= :static; end
25
- def linkage=(new_linkage)
26
- @linkage = new_linkage
27
- end
28
- end
29
- end
@@ -1,10 +0,0 @@
1
- require 'ryb/properties/named'
2
- require 'ryb/properties/suffix'
3
- require 'ryb/properties/defines'
4
- require 'ryb/properties/flags'
5
- require 'ryb/properties/paths'
6
- require 'ryb/properties/files'
7
- require 'ryb/properties/dependencies'
8
- require 'ryb/properties/architectures'
9
- require 'ryb/properties/targets'
10
- require 'ryb/properties/configurations'
@@ -1,32 +0,0 @@
1
- require 'ryb/architectures/x86'
2
- require 'ryb/architectures/x86_64'
3
-
4
- module Ryb
5
- module Properties
6
- module Architectures
7
- module ClassMethods
8
- end
9
-
10
- module InstanceMethods
11
- def architectures
12
- @architectures ||= {}
13
- end
14
-
15
- def architecture(name, &block)
16
- arch = {:x86 => Ryb::Architectures::X86,
17
- :x86_64 => Ryb::Architectures::X86_64}[name].new(&block)
18
- architectures.merge!(name => arch) do |_, *archs|
19
- archs[0].suffix ||= archs[1].suffix
20
- archs[0].defines.merge!(archs[1].defines)
21
- archs[0]
22
- end
23
- end
24
- end
25
-
26
- def self.included(klass)
27
- klass.extend(ClassMethods)
28
- klass.include(InstanceMethods)
29
- end
30
- end
31
- end
32
- end
@@ -1,29 +0,0 @@
1
- module Ryb
2
- module Properties
3
- module Configurations
4
- module ClassMethods
5
- end
6
-
7
- module InstanceMethods
8
- def configurations
9
- @configurations ||= {}
10
- end
11
-
12
- def configuration(name, opts={}, &block)
13
- config = Configuration.new(name, opts, &block)
14
- configurations.merge!(name => config) do |_, *configs|
15
- configs[0].suffix ||= configs[1].suffix
16
- configs[0].defines.merge!(configs[1].defines)
17
- configs[0].instance_variable_set(:@flags, configs[1].instance_variable_get(:@flags))
18
- configs[0]
19
- end
20
- end
21
- end
22
-
23
- def self.included(klass)
24
- klass.extend(ClassMethods)
25
- klass.include(InstanceMethods)
26
- end
27
- end
28
- end
29
- end
@@ -1,31 +0,0 @@
1
- module Ryb
2
- module Properties
3
- module Defines
4
- module ClassMethods
5
- end
6
-
7
- module InstanceMethods
8
- def defines
9
- @defines ||= {}
10
- end
11
-
12
- def define(new_defines)
13
- defines.merge!((new_defines.map do |identifier, value|
14
- if value.is_a? FalseClass
15
- [identifier, '0']
16
- elsif value.is_a? TrueClass
17
- [identifier, '1']
18
- else
19
- [identifier, value.to_s]
20
- end
21
- end).to_h)
22
- end
23
- end
24
-
25
- def self.included(klass)
26
- klass.extend(ClassMethods)
27
- klass.include(InstanceMethods)
28
- end
29
- end
30
- end
31
- end
@@ -1,23 +0,0 @@
1
- module Ryb
2
- module Properties
3
- module Dependencies
4
- module ClassMethods
5
- end
6
-
7
- module InstanceMethods
8
- def dependencies
9
- @dependencies ||= []
10
- end
11
-
12
- def add_dependency(dependency)
13
- dependencies.push(*dependency)
14
- end
15
- end
16
-
17
- def self.included(klass)
18
- klass.extend(ClassMethods)
19
- klass.include(InstanceMethods)
20
- end
21
- end
22
- end
23
- end