mgem 0.1.5 → 0.1.6

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 +14 -9
  2. data/lib/mgem.rb +1 -1
  3. metadata +2 -2
data/bin/mgem CHANGED
@@ -78,17 +78,22 @@ def get_binaries
78
78
  binaries.join ' '
79
79
  end
80
80
 
81
+ DEFAULT_GEMS = {
82
+ 'Math' => 'mrbgems/mruby-math',
83
+ 'Struct' => 'mrbgems/mruby-struct',
84
+ 'Time' => 'mrbgems/mruby-time'
85
+ }
86
+
81
87
  def get_default_gems
82
88
  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
89
  gems = []
89
- gems << 'mrbgems/mruby-math' unless math == 'n'
90
- gems << 'mrbgems/mruby-time' unless time == 'n'
91
-
90
+ DEFAULT_GEMS.each do |gem, path|
91
+ print "Include '#{gem}' GEM? (Y/n): "
92
+ question = STDIN.gets.chomp
93
+ unless question == 'n'
94
+ gems << path
95
+ end
96
+ end
92
97
  gems
93
98
  end
94
99
 
@@ -132,7 +137,7 @@ elsif ARGV[0] == 'config'
132
137
  if ARGV[1] == 'default'
133
138
  toolchain = 'gcc'
134
139
  binaries = 'mrbc mruby mirb'
135
- default_gems = %w(mrbgems/mruby-math mrbgems/mruby-time)
140
+ default_gems = DEFAULT_GEMS.each_value.to_a
136
141
  else
137
142
  toolchain = get_toolchain
138
143
  binaries = get_binaries
@@ -2,7 +2,7 @@ require 'yaml'
2
2
  require 'fileutils'
3
3
  require "stringio"
4
4
 
5
- MGEM_VERSION = '0.1.5'
5
+ MGEM_VERSION = '0.1.6'
6
6
 
7
7
  MGEM_DIR = '.mgem'
8
8
  GEMS_ACTIVE = 'GEMS_ACTIVE.lst'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mgem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-28 00:00:00.000000000 Z
12
+ date: 2013-03-01 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: mgem helps you search and find GEMs specifically written for mruby. It
15
15
  also supports by creating a mruby build configuration.