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.
@@ -1,3 +1,7 @@
1
+ === 0.10.0 / 2009-10-15
2
+
3
+ * Updated to work with dm-core 0.10.0
4
+
1
5
  === 0.9.11 / 2009-03-29
2
6
 
3
7
  * No changes this version
data/Manifest.txt CHANGED
@@ -1,7 +1,7 @@
1
- History.txt
1
+ History.rdoc
2
2
  LICENSE
3
3
  Manifest.txt
4
- README.txt
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
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.txt LICENSE TODO History.txt ],
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/sam/dm-more/tree/master/#{GEM_NAME}"
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
@@ -3,10 +3,10 @@
3
3
  require 'optparse'
4
4
  require 'rubygems'
5
5
 
6
- gem 'dm-core', '0.9.11'
6
+ gem 'dm-core', '0.10.0'
7
7
  require 'dm-core'
8
8
 
9
- gem 'dm-cli', '0.9.11'
9
+ gem 'dm-cli', '0.10.0'
10
10
  require 'dm-cli'
11
11
 
12
12
  DataMapper::CLI::BinDir = File.dirname(__FILE__)
data/lib/dm-cli/cli.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require "yaml"
2
2
  require "irb"
3
- require Pathname("irb/completion")
3
+ require "irb/completion"
4
4
 
5
5
  # TODO: error handling for:
6
6
  # missing adapter, host or database
@@ -1,5 +1,5 @@
1
1
  module DataMapper
2
2
  class CLI
3
- VERSION = '0.9.11'
3
+ VERSION = '0.10.0'.freeze
4
4
  end
5
5
  end
data/lib/dm-cli.rb CHANGED
@@ -1 +1 @@
1
- require File.join(File.dirname(__FILE__), "dm-cli", "cli")
1
+ require 'dm-cli/cli'
data/spec/spec.opts CHANGED
@@ -1 +1,2 @@
1
1
  --colour
2
+ --loadby random
@@ -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')
@@ -1,9 +1,4 @@
1
- require 'rubygems'
2
-
3
- gem 'dm-core', '0.9.11'
4
- require 'dm-core'
5
-
6
- require File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "lib", "dm-cli", "cli"))
1
+ require 'spec_helper'
7
2
 
8
3
  describe DataMapper::CLI do
9
4
 
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 --local pkg/#{GEM_NAME}-#{GEM_VERSION} --no-update-sources"
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.spec_files = Pathname.glob((ROOT + 'spec/**/*_spec.rb').to_s).map { |f| f.to_s }
9
+ t.libs << 'lib' << 'spec' # needed for CI rake spec task, duplicated in spec_helper
12
10
 
13
11
  begin
14
- gem 'rcov', '~>0.8'
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.9.11
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-03-29 00:00:00 -07:00
12
+ date: 2009-09-16 00:00:00 -07:00
13
13
  default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
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.txt
24
+ - README.rdoc
34
25
  - LICENSE
35
26
  - TODO
36
- - History.txt
27
+ - History.rdoc
37
28
  files:
38
- - History.txt
29
+ - History.rdoc
39
30
  - LICENSE
40
31
  - Manifest.txt
41
- - README.txt
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/sam/dm-more/tree/master/dm-cli
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.txt
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.1
70
+ rubygems_version: 1.3.5
77
71
  signing_key:
78
- specification_version: 2
72
+ specification_version: 3
79
73
  summary: DataMapper plugin allowing interaction with models through a CLI
80
74
  test_files: []
81
75