dm-cli 0.9.11 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- data/{History.txt → History.rdoc} +4 -0
- data/Manifest.txt +3 -2
- data/{README.txt → README.rdoc} +0 -0
- data/Rakefile +2 -3
- data/bin/dm +2 -2
- data/lib/dm-cli/cli.rb +1 -1
- data/lib/dm-cli/version.rb +1 -1
- data/lib/dm-cli.rb +1 -1
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +30 -0
- data/spec/unit/cli_spec.rb +1 -6
- data/tasks/install.rb +1 -1
- data/tasks/spec.rb +4 -4
- metadata +15 -21
data/Manifest.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
History.
|
1
|
+
History.rdoc
|
2
2
|
LICENSE
|
3
3
|
Manifest.txt
|
4
|
-
README.
|
4
|
+
README.rdoc
|
5
5
|
Rakefile
|
6
6
|
TODO
|
7
7
|
bin/.irbrc
|
@@ -10,6 +10,7 @@ lib/dm-cli.rb
|
|
10
10
|
lib/dm-cli/cli.rb
|
11
11
|
lib/dm-cli/version.rb
|
12
12
|
spec/spec.opts
|
13
|
+
spec/spec_helper.rb
|
13
14
|
spec/unit/cli_spec.rb
|
14
15
|
tasks/install.rb
|
15
16
|
tasks/spec.rb
|
data/{README.txt → README.rdoc}
RENAMED
File without changes
|
data/Rakefile
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'pathname'
|
2
|
-
require 'rubygems'
|
3
2
|
|
4
3
|
ROOT = Pathname(__FILE__).dirname.expand_path
|
5
4
|
JRUBY = RUBY_PLATFORM =~ /java/
|
@@ -14,11 +13,11 @@ GEM_NAME = 'dm-cli'
|
|
14
13
|
GEM_VERSION = DataMapper::CLI::VERSION
|
15
14
|
GEM_DEPENDENCIES = [['dm-core', GEM_VERSION]]
|
16
15
|
GEM_CLEAN = %w[ log pkg coverage ]
|
17
|
-
GEM_EXTRAS = { :has_rdoc => true, :extra_rdoc_files => %w[ README.
|
16
|
+
GEM_EXTRAS = { :has_rdoc => true, :extra_rdoc_files => %w[ README.rdoc LICENSE TODO History.rdoc ],
|
18
17
|
:executables => %w[ dm ], :bindir => 'bin' }
|
19
18
|
|
20
19
|
PROJECT_NAME = 'datamapper'
|
21
|
-
PROJECT_URL = "http://github.com/
|
20
|
+
PROJECT_URL = "http://github.com/datamapper/dm-more/tree/master/#{GEM_NAME}"
|
22
21
|
PROJECT_DESCRIPTION = PROJECT_SUMMARY = 'DataMapper plugin allowing interaction with models through a CLI'
|
23
22
|
|
24
23
|
[ ROOT, ROOT.parent ].each do |dir|
|
data/bin/dm
CHANGED
data/lib/dm-cli/cli.rb
CHANGED
data/lib/dm-cli/version.rb
CHANGED
data/lib/dm-cli.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
require
|
1
|
+
require 'dm-cli/cli'
|
data/spec/spec.opts
CHANGED
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
|
3
|
+
# use local dm-core if running from a typical dev checkout.
|
4
|
+
lib = File.join('..', '..', 'dm-core', 'lib')
|
5
|
+
$LOAD_PATH.unshift(lib) if File.directory?(lib)
|
6
|
+
require 'dm-core'
|
7
|
+
|
8
|
+
# Support running specs with 'rake spec' and 'spec'
|
9
|
+
$LOAD_PATH.unshift('lib') unless $LOAD_PATH.include?('lib')
|
10
|
+
|
11
|
+
require 'dm-cli'
|
12
|
+
|
13
|
+
def load_driver(name, default_uri)
|
14
|
+
return false if ENV['ADAPTER'] != name.to_s
|
15
|
+
|
16
|
+
begin
|
17
|
+
DataMapper.setup(name, ENV["#{name.to_s.upcase}_SPEC_URI"] || default_uri)
|
18
|
+
DataMapper::Repository.adapters[:default] = DataMapper::Repository.adapters[name]
|
19
|
+
true
|
20
|
+
rescue LoadError => e
|
21
|
+
warn "Could not load do_#{name}: #{e}"
|
22
|
+
false
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
ENV['ADAPTER'] ||= 'sqlite3'
|
27
|
+
|
28
|
+
HAS_SQLITE3 = load_driver(:sqlite3, 'sqlite3::memory:')
|
29
|
+
HAS_MYSQL = load_driver(:mysql, 'mysql://localhost/dm_core_test')
|
30
|
+
HAS_POSTGRES = load_driver(:postgres, 'postgres://postgres@localhost/dm_core_test')
|
data/spec/unit/cli_spec.rb
CHANGED
data/tasks/install.rb
CHANGED
@@ -4,7 +4,7 @@ end
|
|
4
4
|
|
5
5
|
desc "Install #{GEM_NAME} #{GEM_VERSION}"
|
6
6
|
task :install => [ :package ] do
|
7
|
-
sudo_gem "install
|
7
|
+
sudo_gem "install pkg/#{GEM_NAME}-#{GEM_VERSION} --no-update-sources"
|
8
8
|
end
|
9
9
|
|
10
10
|
desc "Uninstall #{GEM_NAME} #{GEM_VERSION}"
|
data/tasks/spec.rb
CHANGED
@@ -1,6 +1,4 @@
|
|
1
1
|
begin
|
2
|
-
gem 'rspec', '~>1.2'
|
3
|
-
require 'spec'
|
4
2
|
require 'spec/rake/spectask'
|
5
3
|
|
6
4
|
task :default => [ :spec ]
|
@@ -8,16 +6,18 @@ begin
|
|
8
6
|
desc 'Run specifications'
|
9
7
|
Spec::Rake::SpecTask.new(:spec) do |t|
|
10
8
|
t.spec_opts << '--options' << 'spec/spec.opts' if File.exists?('spec/spec.opts')
|
11
|
-
t.
|
9
|
+
t.libs << 'lib' << 'spec' # needed for CI rake spec task, duplicated in spec_helper
|
12
10
|
|
13
11
|
begin
|
14
|
-
|
12
|
+
require 'rcov'
|
15
13
|
t.rcov = JRUBY ? false : (ENV.has_key?('NO_RCOV') ? ENV['NO_RCOV'] != 'true' : true)
|
16
14
|
t.rcov_opts << '--exclude' << 'spec'
|
17
15
|
t.rcov_opts << '--text-summary'
|
18
16
|
t.rcov_opts << '--sort' << 'coverage' << '--sort-reverse'
|
19
17
|
rescue LoadError
|
20
18
|
# rcov not installed
|
19
|
+
rescue SyntaxError
|
20
|
+
# rcov syntax invalid
|
21
21
|
end
|
22
22
|
end
|
23
23
|
rescue LoadError
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dm-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wayne E. Seguin
|
@@ -9,19 +9,10 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-09-16 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
|
-
dependencies:
|
15
|
-
|
16
|
-
name: dm-core
|
17
|
-
type: :runtime
|
18
|
-
version_requirement:
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
20
|
-
requirements:
|
21
|
-
- - "="
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 0.9.11
|
24
|
-
version:
|
14
|
+
dependencies: []
|
15
|
+
|
25
16
|
description: DataMapper plugin allowing interaction with models through a CLI
|
26
17
|
email:
|
27
18
|
- wayneeseguin [a] gmail [d] com
|
@@ -30,15 +21,15 @@ executables:
|
|
30
21
|
extensions: []
|
31
22
|
|
32
23
|
extra_rdoc_files:
|
33
|
-
- README.
|
24
|
+
- README.rdoc
|
34
25
|
- LICENSE
|
35
26
|
- TODO
|
36
|
-
- History.
|
27
|
+
- History.rdoc
|
37
28
|
files:
|
38
|
-
- History.
|
29
|
+
- History.rdoc
|
39
30
|
- LICENSE
|
40
31
|
- Manifest.txt
|
41
|
-
- README.
|
32
|
+
- README.rdoc
|
42
33
|
- Rakefile
|
43
34
|
- TODO
|
44
35
|
- bin/.irbrc
|
@@ -47,15 +38,18 @@ files:
|
|
47
38
|
- lib/dm-cli/cli.rb
|
48
39
|
- lib/dm-cli/version.rb
|
49
40
|
- spec/spec.opts
|
41
|
+
- spec/spec_helper.rb
|
50
42
|
- spec/unit/cli_spec.rb
|
51
43
|
- tasks/install.rb
|
52
44
|
- tasks/spec.rb
|
53
45
|
has_rdoc: true
|
54
|
-
homepage: http://github.com/
|
46
|
+
homepage: http://github.com/datamapper/dm-more/tree/master/dm-cli
|
47
|
+
licenses: []
|
48
|
+
|
55
49
|
post_install_message:
|
56
50
|
rdoc_options:
|
57
51
|
- --main
|
58
|
-
- README.
|
52
|
+
- README.rdoc
|
59
53
|
require_paths:
|
60
54
|
- lib
|
61
55
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -73,9 +67,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
67
|
requirements: []
|
74
68
|
|
75
69
|
rubyforge_project: datamapper
|
76
|
-
rubygems_version: 1.3.
|
70
|
+
rubygems_version: 1.3.5
|
77
71
|
signing_key:
|
78
|
-
specification_version:
|
72
|
+
specification_version: 3
|
79
73
|
summary: DataMapper plugin allowing interaction with models through a CLI
|
80
74
|
test_files: []
|
81
75
|
|