mgem 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/mgem +31 -4
  2. data/lib/mgem.rb +1 -1
  3. metadata +14 -15
data/bin/mgem CHANGED
@@ -63,11 +63,11 @@ end
63
63
 
64
64
  def get_binaries
65
65
  puts
66
- print 'Compile mrbc? (y/n): '
66
+ print 'Compile mrbc? (Y/n): '
67
67
  mrbc = STDIN.gets.chomp
68
- print 'Compile mruby? (y/n): '
68
+ print 'Compile mruby? (Y/n): '
69
69
  mruby = STDIN.gets.chomp
70
- print 'Compile mirb? (y/n): '
70
+ print 'Compile mirb? (Y/n): '
71
71
  mirb = STDIN.gets.chomp
72
72
 
73
73
  binaries = []
@@ -78,6 +78,20 @@ def get_binaries
78
78
  binaries.join ' '
79
79
  end
80
80
 
81
+ def get_default_gems
82
+ puts
83
+ print 'Include "Math" GEM? (Y/n): '
84
+ math = STDIN.gets.chomp
85
+ print 'Include "Time" GEM? (Y/n): '
86
+ time = STDIN.gets.chomp
87
+
88
+ gems = []
89
+ gems << 'mrbgems/mruby-math' unless math == 'n'
90
+ gems << 'mrbgems/mruby-time' unless time == 'n'
91
+
92
+ gems
93
+ end
94
+
81
95
  if ARGV[0] == 'info' or ARGV[0] == 'detail'
82
96
  puts "Detail information of '#{ARGV[1]}':"
83
97
  gems.search(ARGV[1], :name).each {|gem| detail_info_proc.call(gem) }
@@ -118,15 +132,24 @@ elsif ARGV[0] == 'config'
118
132
  if ARGV[1] == 'default'
119
133
  toolchain = 'gcc'
120
134
  binaries = 'mrbc mruby mirb'
135
+ default_gems = %w(mrbgems/mruby-math mrbgems/mruby-time)
121
136
  else
122
137
  toolchain = get_toolchain
123
138
  binaries = get_binaries
139
+ default_gems = get_default_gems
124
140
  end
141
+
142
+ default_gem_command = default_gems.map do |g|
143
+ " conf.gem '#{g}'"
144
+ end.join("\n")
145
+ if default_gem_command == ''
146
+ default_gem_command = ' # No GEMs activated'
147
+ end
148
+
125
149
  gem_command = gems.active.map do |g|
126
150
  options = ", :options => \'#{g.repooptions}\'" unless g.repooptions.nil?
127
151
  " conf.gem :git => \'#{g.repository}\'#{options}"
128
152
  end.join("\n")
129
-
130
153
  if gem_command == ''
131
154
  gem_command = ' # No GEMs activated'
132
155
  end
@@ -141,6 +164,10 @@ MRuby::Build.new do |conf|
141
164
 
142
165
  conf.bins = %w(#{binaries})
143
166
 
167
+ # mruby's default GEMs
168
+ #{default_gem_command}
169
+
170
+ # user-defined GEMs
144
171
  #{gem_command}
145
172
  end
146
173
 
@@ -2,7 +2,7 @@ require 'yaml'
2
2
  require 'fileutils'
3
3
  require "stringio"
4
4
 
5
- MGEM_VERSION = '0.1.4'
5
+ MGEM_VERSION = '0.1.5'
6
6
 
7
7
  MGEM_DIR = '.mgem'
8
8
  GEMS_ACTIVE = 'GEMS_ACTIVE.lst'
metadata CHANGED
@@ -1,17 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mgem
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.1.4
4
+ version: 0.1.5
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Daniel Bovensiepen
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-09 00:00:00.000000000 Z
12
+ date: 2013-02-28 00:00:00.000000000 Z
13
13
  dependencies: []
14
- description: mgem helps you search and find GEMs specifically written for mruby. It also supports by creating a mruby build configuration.
14
+ description: mgem helps you search and find GEMs specifically written for mruby. It
15
+ also supports by creating a mruby build configuration.
15
16
  email: daniel@bovensiepen.net
16
17
  executables:
17
18
  - mgem
@@ -23,28 +24,26 @@ files:
23
24
  homepage: http://github.com/bovi/mgem
24
25
  licenses:
25
26
  - MIT
26
- post_install_message:
27
+ post_install_message:
27
28
  rdoc_options: []
28
29
  require_paths:
29
30
  - lib
30
31
  required_ruby_version: !ruby/object:Gem::Requirement
32
+ none: false
31
33
  requirements:
32
34
  - - ! '>='
33
35
  - !ruby/object:Gem::Version
34
- version: !binary |-
35
- MA==
36
- none: false
36
+ version: '0'
37
37
  required_rubygems_version: !ruby/object:Gem::Requirement
38
+ none: false
38
39
  requirements:
39
40
  - - ! '>='
40
41
  - !ruby/object:Gem::Version
41
- version: !binary |-
42
- MA==
43
- none: false
42
+ version: '0'
44
43
  requirements: []
45
- rubyforge_project:
46
- rubygems_version: 1.8.24
47
- signing_key:
44
+ rubyforge_project:
45
+ rubygems_version: 1.8.23
46
+ signing_key:
48
47
  specification_version: 3
49
48
  summary: A program to manage GEMs for mruby.
50
49
  test_files: []