rughetto-ar_object_pack 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +3 -1
- data/Rakefile +25 -13
- data/TODO +2 -1
- metadata +3 -4
data/README
CHANGED
|
@@ -20,8 +20,10 @@ If using Merb, adding the gem as a dependency will also load the required method
|
|
|
20
20
|
require File.dirname(__FILE__) + PATH_TO_GEM_LIB_DIR +'/ar_object_pack/object_packer'
|
|
21
21
|
ActiveRecord::Base.send(:extend, ArObjectPack::ObjectPackager::ActiveRecordMethods)
|
|
22
22
|
|
|
23
|
-
PATH_TO_GEM_LIB_DIR above should be replaced by the relative path from the initialization file to the gem library.
|
|
23
|
+
PATH_TO_GEM_LIB_DIR above should be replaced by the relative path from the initialization file to the gem library.
|
|
24
24
|
|
|
25
|
+
ar_object_pack can also be installed as a Rails Plugin using:
|
|
26
|
+
ruby script/plugin install git://github.com/rughetto/ar_object_pack.git
|
|
25
27
|
|
|
26
28
|
USAGE
|
|
27
29
|
=====
|
data/Rakefile
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
WIN32 = (RUBY_PLATFORM =~ /win32|mingw|bccwin|cygwin/) rescue nil
|
|
2
|
+
SUDO = WIN32 ? '' : ('sudo' unless ENV['SUDOLESS'])
|
|
3
|
+
|
|
1
4
|
require 'rubygems'
|
|
2
5
|
require 'rake/gempackagetask'
|
|
3
6
|
require 'spec/rake/spectask'
|
|
@@ -6,10 +9,10 @@ require 'merb-core'
|
|
|
6
9
|
require 'merb-core/tasks/merb'
|
|
7
10
|
|
|
8
11
|
GEM_NAME = "ar_object_pack"
|
|
9
|
-
GEM_VERSION = "0.0.
|
|
12
|
+
GEM_VERSION = "0.0.2"
|
|
10
13
|
AUTHOR = "Rue The Ghetto"
|
|
11
14
|
EMAIL = "ru_ghetto@rubyghetto.com"
|
|
12
|
-
HOMEPAGE = "http://github.com/
|
|
15
|
+
HOMEPAGE = "http://github.com/rughetto/ar_object_pack"
|
|
13
16
|
SUMMARY = "ActiveRecord plugin originally designed for Merb use that allows the packaging of objects into formats: marshal, json and yaml."
|
|
14
17
|
|
|
15
18
|
spec = Gem::Specification.new do |s|
|
|
@@ -25,7 +28,7 @@ spec = Gem::Specification.new do |s|
|
|
|
25
28
|
s.email = EMAIL
|
|
26
29
|
s.homepage = HOMEPAGE
|
|
27
30
|
|
|
28
|
-
s.add_dependency('
|
|
31
|
+
s.add_dependency('activerecord')
|
|
29
32
|
s.add_dependency('json')
|
|
30
33
|
|
|
31
34
|
s.require_path = 'lib'
|
|
@@ -36,16 +39,6 @@ Rake::GemPackageTask.new(spec) do |pkg|
|
|
|
36
39
|
pkg.gem_spec = spec
|
|
37
40
|
end
|
|
38
41
|
|
|
39
|
-
desc "install the plugin as a gem"
|
|
40
|
-
task :install do
|
|
41
|
-
Merb::RakeHelper.install(GEM_NAME, :version => GEM_VERSION)
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
desc "Uninstall the gem"
|
|
45
|
-
task :uninstall do
|
|
46
|
-
Merb::RakeHelper.uninstall(GEM_NAME, :version => GEM_VERSION)
|
|
47
|
-
end
|
|
48
|
-
|
|
49
42
|
desc "Create a gemspec file"
|
|
50
43
|
task :gemspec do
|
|
51
44
|
File.open("#{GEM_NAME}.gemspec", "w") do |file|
|
|
@@ -53,6 +46,25 @@ task :gemspec do
|
|
|
53
46
|
end
|
|
54
47
|
end
|
|
55
48
|
|
|
49
|
+
desc "Install #{GEM_NAME}"
|
|
50
|
+
if WIN32
|
|
51
|
+
task :install => :gem do
|
|
52
|
+
system %{gem install --no-rdoc --no-ri -l pkg/#{GEM_NAME}-#{GEM_VERSION}.gem}
|
|
53
|
+
end
|
|
54
|
+
namespace :dev do
|
|
55
|
+
desc 'Install for development (for windows)'
|
|
56
|
+
task :winstall => :gem do
|
|
57
|
+
warn "You can now call 'rake install' instead of 'rake dev:winstall'."
|
|
58
|
+
system %{gem install --no-rdoc --no-ri -l pkg/#{GEM_NAME}-#{GEM_VERSION}.gem}
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
else
|
|
62
|
+
task :install => :package do
|
|
63
|
+
sh %{#{SUDO} gem install --local pkg/#{GEM_NAME}-#{GEM_VERSION}.gem}
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
|
|
56
68
|
Spec::Rake::SpecTask.new do |t|
|
|
57
69
|
t.warning = true
|
|
58
70
|
t.spec_opts = ["--format", "specdoc", "--colour"]
|
data/TODO
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rughetto-ar_object_pack
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rue The Ghetto
|
|
@@ -13,7 +13,7 @@ date: 2009-01-05 00:00:00 -08:00
|
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
|
-
name:
|
|
16
|
+
name: activerecord
|
|
17
17
|
version_requirement:
|
|
18
18
|
version_requirements: !ruby/object:Gem::Requirement
|
|
19
19
|
requirements:
|
|
@@ -50,12 +50,11 @@ files:
|
|
|
50
50
|
- lib/ar_object_pack.rb
|
|
51
51
|
- spec/ar_object_pack_spec.rb
|
|
52
52
|
- spec/database_spec_setup.rb
|
|
53
|
-
- spec/dbs
|
|
54
53
|
- spec/irb_tester.rb
|
|
55
54
|
- spec/spec.opts
|
|
56
55
|
- spec/spec_helper.rb
|
|
57
56
|
has_rdoc: true
|
|
58
|
-
homepage: http://github.com/
|
|
57
|
+
homepage: http://github.com/rughetto/ar_object_pack
|
|
59
58
|
post_install_message:
|
|
60
59
|
rdoc_options: []
|
|
61
60
|
|