dev_git 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/git.rb +24 -0
  3. metadata +15 -71
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 022dc21063df0101ad4d94c80258cd5c4b180b08
4
- data.tar.gz: d76f0166dbbde26e047812b74a2f066e3bae9709
3
+ metadata.gz: 7bb250c0996f50c47a9dd25e8dfae91ddb8ac285
4
+ data.tar.gz: 0f973dbabd5b22139e5aed5cb35c24e8f338224a
5
5
  SHA512:
6
- metadata.gz: 46063e7245361c8ecf0598614520e395270b45b3a1d9e8c65bcc315ed270fababd7cdc78851ca2848bb4ef450b72e4bebe6a34784e172dd93b279652e2c7f18e
7
- data.tar.gz: eb148e9d175d55e1fe4b192fb9cb7d8ad14ad6f15922d3cc27e4b2839196db5dc387ca99b70f335a7eb9d4994688b107ae35ba5eeeff1b6f329e3b6c2fe5e45e
6
+ metadata.gz: 21360dfb65d82af2c67865fdb7fbc1785229b9cf50e1a3fb63cbd43922a9d5cc9a4f2161d646b8abad9ac4795611cc62ca9ccffa9dd1295f82aeb3e9111816d2
7
+ data.tar.gz: 130d0c2404ede542523ecc58dfb4ce5584b3142f32fade5cb92d1c7834f6efdf68a3165c0897f369beebb18a925cc1945958f4cfba7def2cf0f5b62a52927ce3
data/lib/git.rb CHANGED
@@ -19,4 +19,28 @@ class Git
19
19
  end
20
20
  url
21
21
  end
22
+
23
+ def self.has_changes? directory=''
24
+ directory=Dir.pwd if directory.length==0
25
+ Dir.chdir(directory) do
26
+ if(File.exists?('.git'))
27
+ return true if `git status`.include?('modified:')
28
+ end
29
+ end
30
+ false
31
+ # $ git status
32
+ # On branch master
33
+ # nothing to commit, working directory clean
34
+
35
+ # $ git status
36
+ # On branch master
37
+ # Changes not staged for commit:
38
+ # (use "git add <file>..." to update what will be committed)
39
+ # (use "git checkout -- <file>..." to discard changes in working directory)
40
+ #
41
+ # modified: lib/git.rb
42
+ #
43
+ # no changes added to commit (use "git add" and/or "git commit -a")
44
+
45
+ end
22
46
  end
metadata CHANGED
@@ -1,111 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev_git
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-16 00:00:00.000000000 Z
11
+ date: 2015-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - '>='
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: rspec
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - '>='
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - '>='
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: yard
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - '>='
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: rake
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
19
+ version: '10.0'
62
20
  type: :development
63
21
  prerelease: false
64
22
  version_requirements: !ruby/object:Gem::Requirement
65
23
  requirements:
66
- - - '>='
24
+ - - "~>"
67
25
  - !ruby/object:Gem::Version
68
- version: '0'
26
+ version: '10.0'
69
27
  - !ruby/object:Gem::Dependency
70
28
  name: rspec
71
29
  requirement: !ruby/object:Gem::Requirement
72
30
  requirements:
73
- - - '>='
31
+ - - "~>"
74
32
  - !ruby/object:Gem::Version
75
- version: '0'
33
+ version: '3.0'
76
34
  type: :development
77
35
  prerelease: false
78
36
  version_requirements: !ruby/object:Gem::Requirement
79
37
  requirements:
80
- - - '>='
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: yard
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - '>='
38
+ - - "~>"
88
39
  - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - '>='
95
- - !ruby/object:Gem::Version
96
- version: '0'
40
+ version: '3.0'
97
41
  description: execution of git operations
98
42
  email: lou.parslow@gmail.com
99
43
  executables: []
100
44
  extensions: []
101
45
  extra_rdoc_files: []
102
46
  files:
47
+ - LICENSE
48
+ - README.md
103
49
  - lib/dev_git.rb
104
50
  - lib/git.rb
105
51
  - spec/dev_git_spec.rb
106
52
  - spec/git_spec.rb
107
- - LICENSE
108
- - README.md
109
53
  homepage: http://github.com/lou-parslow/dev_git.gem
110
54
  licenses:
111
55
  - Apache 2.0
@@ -116,17 +60,17 @@ require_paths:
116
60
  - lib
117
61
  required_ruby_version: !ruby/object:Gem::Requirement
118
62
  requirements:
119
- - - '>='
63
+ - - ">="
120
64
  - !ruby/object:Gem::Version
121
65
  version: '0'
122
66
  required_rubygems_version: !ruby/object:Gem::Requirement
123
67
  requirements:
124
- - - '>='
68
+ - - ">="
125
69
  - !ruby/object:Gem::Version
126
70
  version: '0'
127
71
  requirements: []
128
72
  rubyforge_project:
129
- rubygems_version: 2.0.14
73
+ rubygems_version: 2.2.2
130
74
  signing_key:
131
75
  specification_version: 4
132
76
  summary: gem to assist with git operations