xtrn 0.1.2 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Gemfile.lock +1 -1
  2. data/bin/xtrn_tar +43 -0
  3. data/lib/xtrn/version.rb +1 -1
  4. metadata +67 -38
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- xtrn (0.1.2)
4
+ xtrn (0.1.0)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
data/bin/xtrn_tar ADDED
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env ruby
2
+ require 'xtrn'
3
+ require 'yaml'
4
+ require 'tempfile'
5
+
6
+ tarball = ARGV[0]
7
+
8
+ if !tarball
9
+ puts "Usage: xtrn_tar <tarball_name>"
10
+ exit 1
11
+ end
12
+
13
+ GITIGNORE = '.gitignore'
14
+
15
+ # All this to get a tempdir
16
+ tempfile = Tempfile.new('xtrn_tar')
17
+ tempdir = tempfile.path
18
+ tempfile.close
19
+ tempfile.unlink
20
+
21
+ oldwd = Dir.getwd
22
+ FileUtils.rm_f(tempdir)
23
+ FileUtils.mkdir_p(tempdir)
24
+
25
+ FileUtils.cp 'Externals', tempdir
26
+ FileUtils.cp GITIGNORE, tempdir if File.file? GITIGNORE
27
+
28
+ Dir.chdir(tempdir)
29
+
30
+ dir = Xtrn::Directory.new(YAML.load(File.open('Externals', 'rb', &:read)), Xtrn::Executor.new)
31
+ dir.update!
32
+
33
+ gitignore_contents = File.file?(GITIGNORE) ? File.open(GITIGNORE, 'rb', &:read) : ''
34
+ updated_gitignore_contents = dir.updated_gitignore(gitignore_contents)
35
+
36
+ File.open(GITIGNORE, 'wb') {|f|f.write(updated_gitignore_contents)} unless updated_gitignore_contents == gitignore_contents
37
+
38
+ Dir.chdir(oldwd)
39
+ filelist = ['.']
40
+ filelist << '.gitignore' if File.file? GITIGNORE
41
+ ret = system("tar czf #{tarball} -C #{tempdir} #{filelist.join(' ')}")
42
+ FileUtils.rm_rf(tempdir)
43
+ exit ret
data/lib/xtrn/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Xtrn
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.4'
3
3
  end
metadata CHANGED
@@ -1,54 +1,73 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: xtrn
3
- version: !ruby/object:Gem::Version
4
- version: 0.1.2
5
- prerelease:
3
+ version: !ruby/object:Gem::Version
4
+ hash: 19
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 4
10
+ version: 0.1.4
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - James Fairbairn
9
14
  - Gavin Sandie
10
15
  autorequire:
11
16
  bindir: bin
12
17
  cert_chain: []
13
- date: 2012-01-23 00:00:00.000000000 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
18
+
19
+ date: 2012-03-15 00:00:00 +00:00
20
+ default_executable:
21
+ dependencies:
22
+ - !ruby/object:Gem::Dependency
16
23
  name: rspec
17
- requirement: &20704540 !ruby/object:Gem::Requirement
24
+ prerelease: false
25
+ requirement: &id001 !ruby/object:Gem::Requirement
18
26
  none: false
19
- requirements:
27
+ requirements:
20
28
  - - ~>
21
- - !ruby/object:Gem::Version
22
- version: '2.8'
29
+ - !ruby/object:Gem::Version
30
+ hash: 19
31
+ segments:
32
+ - 2
33
+ - 8
34
+ version: "2.8"
23
35
  type: :development
24
- prerelease: false
25
- version_requirements: *20704540
26
- - !ruby/object:Gem::Dependency
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
27
38
  name: autotest
28
- requirement: &20704040 !ruby/object:Gem::Requirement
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
29
41
  none: false
30
- requirements:
42
+ requirements:
31
43
  - - ~>
32
- - !ruby/object:Gem::Version
33
- version: '4.4'
44
+ - !ruby/object:Gem::Version
45
+ hash: 19
46
+ segments:
47
+ - 4
48
+ - 4
49
+ version: "4.4"
34
50
  type: :development
35
- prerelease: false
36
- version_requirements: *20704040
51
+ version_requirements: *id002
37
52
  description:
38
- email:
53
+ email:
39
54
  - james@mediamolecule.com
40
55
  - gavin@mediamolecule.com
41
- executables:
56
+ executables:
42
57
  - xtrn
58
+ - xtrn_tar
43
59
  extensions: []
60
+
44
61
  extra_rdoc_files: []
45
- files:
62
+
63
+ files:
46
64
  - .gitignore
47
65
  - .rspec
48
66
  - Gemfile
49
67
  - Gemfile.lock
50
68
  - README.md
51
69
  - bin/xtrn
70
+ - bin/xtrn_tar
52
71
  - lib/xtrn.rb
53
72
  - lib/xtrn/directory.rb
54
73
  - lib/xtrn/executor.rb
@@ -56,29 +75,39 @@ files:
56
75
  - spec/spec_helpers.rb
57
76
  - spec/xtrn_spec.rb
58
77
  - xtrn.gemspec
78
+ has_rdoc: true
59
79
  homepage:
60
80
  licenses: []
81
+
61
82
  post_install_message:
62
83
  rdoc_options: []
63
- require_paths:
84
+
85
+ require_paths:
64
86
  - lib
65
- required_ruby_version: !ruby/object:Gem::Requirement
87
+ required_ruby_version: !ruby/object:Gem::Requirement
66
88
  none: false
67
- requirements:
68
- - - ! '>='
69
- - !ruby/object:Gem::Version
70
- version: '0'
71
- required_rubygems_version: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ hash: 3
93
+ segments:
94
+ - 0
95
+ version: "0"
96
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
97
  none: false
73
- requirements:
74
- - - ! '>='
75
- - !ruby/object:Gem::Version
76
- version: '0'
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ hash: 3
102
+ segments:
103
+ - 0
104
+ version: "0"
77
105
  requirements: []
106
+
78
107
  rubyforge_project:
79
- rubygems_version: 1.8.11
108
+ rubygems_version: 1.3.7
80
109
  signing_key:
81
110
  specification_version: 3
82
- summary: Manage your externals without locking yourself into a single source control
83
- system.
111
+ summary: Manage your externals without locking yourself into a single source control system.
84
112
  test_files: []
113
+