dev_projects 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 604c4c2dd2b6dc6d05bfdb29b805c3bdd9da7c22
4
- data.tar.gz: 2c1f93407f3d3e4b5747b701cad9ad1f7cb5181d
3
+ metadata.gz: ad29de38be5d07e936f0f82b0eea7dbe01c30d7b
4
+ data.tar.gz: 58fa39d331bdf722bef690743030251ba1386a83
5
5
  SHA512:
6
- metadata.gz: 3134016f51a9347f0e9d6b0b87644f031221f92e1ada782b2824898ea62583f4c835e9acae0f2d27a4f50e80d6a4f081a6acc925ca17aa1c0a4f10df873b7b3a
7
- data.tar.gz: 8f000952bab95edc68f6ca56af3052ba6ab6500313f310f40c3b4988ce74f4da2a5a185f7e77da9b7b5a7ac4e60602a28626f01681ae7fe22fca40e95db09a2e
6
+ metadata.gz: 8dea78f6227a3df14d957e715cb5bf0943e9c4802ae70f4c1a53a9ccfd508cc455c0d7694e4068466b8ae5a6c0ae32134bc6e063263e266ba9125a91e6461faf
7
+ data.tar.gz: 76c55f799885d3d4a21a0ae4b7bbaa910f4ea758aaa8fc09b8c62f32834e6300d9d480793d3ecfb76006380e99422164adada1bb801fc082c59da2b495fba3bf
data/lib/build.rb ADDED
@@ -0,0 +1,5 @@
1
+ class Build < Hash
2
+ def initialize
3
+ self[:unique_id]=''
4
+ end
5
+ end
data/lib/dev_projects.rb CHANGED
@@ -1,2 +1,4 @@
1
- require 'dev_environment'
2
- require_relative 'project.rb'
1
+ require 'dev_environment'
2
+ require_relative 'project.rb'
3
+
4
+ PROJECTS=Project.load_projects
data/lib/project.rb CHANGED
@@ -1,5 +1,20 @@
1
- class Project < Hash
2
- def initialize
3
- self[:url]=''
4
- end
1
+ class Project < Hash
2
+ def initialize
3
+ self[:url]=''
4
+ end
5
+
6
+ def get_latest_unique_id
7
+ '51ed9c9d45ba3979c808740d75ba1831c85aff5d'
8
+ end
9
+
10
+ def self.projects_filename
11
+ FileUtils.mkdir("#{Environment.dev_root}/data") if(!File.exists?("#{Environment.dev_root}/data"))
12
+ "#{Environment.dev_root}/data/PROJECTS.json"
13
+ end
14
+
15
+ def self.load_projects
16
+ projects=Hash.new
17
+ projects=JSON.parse(IO.read(projects_filename)) if File.exists?(projects_filename)
18
+ projects
19
+ end
5
20
  end
@@ -0,0 +1,22 @@
1
+ require_relative '../lib/build.rb'
2
+
3
+ describe Build do
4
+ it "should support the :unique_id key" do
5
+ build=Build.new
6
+ # :unique_id
7
+ expect(build[:unique_id]).to eq('')
8
+ build[:unique_id]='51ed9c9d45ba3979c808740d75ba1831c85aff5d'
9
+ expect(build[:unique_id]).to eq('51ed9c9d45ba3979c808740d75ba1831c85aff5d')
10
+ end
11
+
12
+ it "should be able to support the :project key" do
13
+ build=Build.new
14
+ expect(build[:project]).to eq(nil)
15
+ #build[:unique_id]='51ed9c9d45ba3979c808740d75ba1831c85aff5d'
16
+ #expect(build[:unique_id]).to eq('51ed9c9d45ba3979c808740d75ba1831c85aff5d')
17
+ end
18
+
19
+ it "should be able to execute" do
20
+
21
+ end
22
+ end
data/spec/project_spec.rb CHANGED
@@ -1,11 +1,18 @@
1
1
  require_relative '../lib/project.rb'
2
2
 
3
3
  describe Project do
4
- it "should suppot the :url key" do
4
+ it "should support the :url key" do
5
5
  project=Project.new
6
6
  # :url
7
7
  expect(project[:url]).to eq('')
8
8
  project[:url]='https://github.com/lou-parslow/dev_projects.gem.git'
9
9
  expect(project[:url]).to eq('https://github.com/lou-parslow/dev_projects.gem.git')
10
10
  end
11
+
12
+ it "should be able to get a unique_id" do
13
+ project=Project.new
14
+ project[:uri]='https://github.com/lou-parslow/dev_projects.gem.git'
15
+ unique_id = project.get_latest_unique_id
16
+ expect(unique_id.length).to eq(40)
17
+ end
11
18
  end
metadata CHANGED
@@ -1,65 +1,53 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev_projects
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-09 00:00:00.000000000 Z
11
+ date: 2015-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rake
14
+ name: dev_commands
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - '>='
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 0.0.23
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '>='
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 0.0.23
27
27
  - !ruby/object:Gem::Dependency
28
- name: rspec
28
+ name: dev_commands
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '>='
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 0.0.23
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '>='
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: json
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - '>='
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
40
+ version: 0.0.23
55
41
  description: management of development projects
56
42
  email: lou.parslow@gmail.com
57
43
  executables: []
58
44
  extensions: []
59
45
  extra_rdoc_files: []
60
46
  files:
47
+ - lib/build.rb
61
48
  - lib/dev_projects.rb
62
49
  - lib/project.rb
50
+ - spec/build_spec.rb
63
51
  - spec/project_spec.rb
64
52
  - LICENSE
65
53
  - README.md