au 0.2.0 → 0.2.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa95d04570850dee2f2925f15f73e3bcec71cece8d85fd3a96eed234615df6e9
4
- data.tar.gz: a2ad2985e381758e42dda23e14781d47fcb16dabcf2539a720e67c5823f1fb0b
3
+ metadata.gz: a1f863f4f77ac12d48c9cc1fce11cf11745fe17752eff77e6d7800d78bfbac33
4
+ data.tar.gz: ef650acf468825bc91bf40653c748dce3d8fc95917e66d6df178b8c29f391d6e
5
5
  SHA512:
6
- metadata.gz: 0a3430e195cd66c77a7b8e6228e459d6c75fa3bb0d42f4d1e305d152b37b6c63d714e05a2410314d2144916e6871202576ecc2089d66b1fa56aebb2c8064e5ef
7
- data.tar.gz: 07d9fa7e97ca6b3f80937ee5a0e16d3e2480935fe11e5caf62708030b7d4ef7c2b07125f97245d1bcb856b7c3ac68fd84648e2d5816e2dc3ac5372f0622e9945
6
+ metadata.gz: f77dc0459d3585eb6a974650ccf2ffeef1aed8893a897ca52a8c3793ab1cdf220f7135c424e9718cbe374ea60df309217d0027f6839678cc5cae55cfbc2b657c
7
+ data.tar.gz: b1a17e0618cc0e5b87aa6e52ec77b2f796958d21c226cd96f88ea72362a96e5121543037a63e6925f83435b43f97d6d35e99ea0676e0b0ebfa09ea3c23275837
data/.gitignore CHANGED
@@ -207,3 +207,6 @@ $RECYCLE.BIN/
207
207
 
208
208
  # au playground
209
209
  test_tmp/**/*
210
+
211
+ end-to-end_test_repo/**/*
212
+ end-to-end_test_repo2/**/*
@@ -0,0 +1,90 @@
1
+ ## Design Document
2
+
3
+ A simple get-started [tutorial video](https://www.useloom.com/share/6372bf5d22b8482299f3c788559d4173).
4
+
5
+ ```bash
6
+ ## Design Document
7
+
8
+ A simple get-started [tutorial video](https://www.useloom.com/share/6372bf5d22b8482299f3c788559d4173).
9
+
10
+ Commands:
11
+
12
+ au cat COMMIT_ID PATH
13
+
14
+ # Display file from a provided commit.
15
+
16
+ au checkout COMMIT_ID
17
+
18
+ # Check out a commit. Similar behavior with git checkout.
19
+
20
+ au clone REMOTE_PATH [optional: LOCAL_PATH]
21
+
22
+ # Copy an existing repo from the provided remote path.
23
+
24
+ au commit [-m MESSAGE]
25
+
26
+ # Commit already staged files. Use -m to provide commit message.
27
+
28
+ au diff PATH
29
+
30
+ # Display diff between the file state from HEAD and from presence.
31
+
32
+ au heads
33
+
34
+ # Display ids of commits that don't have children.
35
+
36
+ au help [COMMAND]
37
+
38
+ # Describe available commands or one specific command
39
+
40
+ au init
41
+
42
+ # Start tracking current directory
43
+
44
+ au log
45
+
46
+ # Display parent commits. Only true lineage is displayed, meaning that
47
+
48
+ # the second parents from merged commits are ignored.
49
+
50
+ au merge COMMIT_ID
51
+
52
+ # Merge with provided commit to the current commit.
53
+
54
+ # Commit will be created automatically unless conflict happens.
55
+
56
+ # User is responsible for committing after resovling conflicts.
57
+
58
+ au pull REMOTE_PATH
59
+
60
+ # Pull changes from remote repo.
61
+
62
+ # Merge will not happen since branching is not supported.
63
+
64
+ au push REMOTE_PATH
65
+
66
+ # Push changes to remote repo.
67
+
68
+ # Merge will not happen since branching is not supported.
69
+
70
+ au reset
71
+
72
+ # Remove all history from the project.
73
+
74
+ au stage PATH
75
+
76
+ # Stage one or more files for commit. If a dir path is provided, all files within the
77
+
78
+ # dir are staged.
79
+
80
+ au status
81
+
82
+ # Check current status of repo. Displays staged and unstaged files, as well as
83
+
84
+ # current HEAD ID.
85
+
86
+ au unstage PATHS
87
+
88
+ # Remove one or more files from the staging area.
89
+
90
+ ```
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- au (0.2.0)
4
+ au (0.2.1)
5
5
  colorize
6
6
  thor
7
7
 
data/README.md CHANGED
@@ -26,64 +26,6 @@ To install
26
26
  **any older version will error**. If your system comes with an older version, please either
27
27
  update your Ruby installation or use [rbenv](https://github.com/rbenv/rbenv). You may need to use `sudo`. Additionally, if you are on an outdated Ruby installation, please make sure your load path is updated for Ruby executable.
28
28
 
29
- ## Design Document
30
-
31
- A simple get-started [tutorial video](https://www.useloom.com/share/6372bf5d22b8482299f3c788559d4173).
32
-
33
- ```
34
- Commands:
35
- au cat COMMIT_ID PATH
36
- # Display file from a provided commit.
37
-
38
- au checkout COMMIT_ID
39
- # Check out a commit. Similar behavior with git checkout.
40
-
41
- au clone REMOTE_PATH [optional: LOCAL_PATH]
42
- # Copy an existing repo from the provided remote path.
43
-
44
- au commit [-m MESSAGE]
45
- # Commit already staged files. Use -m to provide commit message.
46
-
47
- au diff PATH
48
- # Display diff between the file state from HEAD and from presence.
49
-
50
- au heads
51
- # Display ids of commits that don't have children.
52
-
53
- au help [COMMAND]
54
- # Describe available commands or one specific command
55
-
56
- au init
57
- # Start tracking current directory
58
-
59
- au log
60
- # Display parent commits. Only true lineage is displayed, meaning that
61
- # the second parents from merged commits are ignored.
62
-
63
- au merge COMMIT_ID
64
- # Merge with provided commit.
65
-
66
- au pull REMOTE_PATH
67
- # Pull changes from remote repo.
68
-
69
- au push REMOTE_PATH
70
- # Push changes to remote repo.
71
-
72
- au reset
73
- # Remove all history from the project.
74
-
75
- au stage PATH
76
- # Stage one or more files for commit. If a dir path is provided, all files within the
77
- # dir are staged.
78
-
79
- au status
80
- # Check current status of repo. Displays staged and unstaged files, as well as
81
- # current HEAD ID.
82
-
83
- au unstage PATHS
84
- # Remove one or more files from the staging area.
85
- ```
86
-
87
29
  ## Development Build
88
30
 
89
31
  This project uses bundler to manage production and development dependencies (see more in 'depenedencies' section).
@@ -98,6 +40,8 @@ Unit specs are written in RSpec. Use `bundle exec rspec` to run all unit specs.
98
40
 
99
41
  Use `ruby -Ilib:test test/integration_test.rb` to run integration test.
100
42
 
43
+ Use `ruby -Ilib:test test/end-to-end_test.rb` to run end-to-end test.
44
+
101
45
  To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
102
46
 
103
47
  ## Dependencies
data/bin/au CHANGED
@@ -137,7 +137,7 @@ module Au
137
137
 
138
138
  desc "merge COMMIT", "Merge with provided commit"
139
139
  def merge(commit_id)
140
- Repository.instance.merge(commit_id)
140
+ puts Repository.instance.merge(commit_id)
141
141
  end
142
142
 
143
143
  desc "pull REMOTE_PATH", "Pull changes from remote repo"
data/lib/au.rb CHANGED
@@ -7,6 +7,6 @@ require 'au/models/diff'
7
7
  require 'au/models/document'
8
8
  require 'au/models/repository'
9
9
  require 'au/models/staging'
10
- require 'pry'
10
+
11
11
  module Au
12
12
  end
@@ -62,10 +62,10 @@ module Au
62
62
 
63
63
  def merge(commit_to_merge)
64
64
  commit_id = Commit.merge(@head, commit_to_merge)
65
- return false if commit_id.nil?
65
+ return nil if commit_id.nil?
66
66
  # checkout to new commit
67
67
  checkout(commit_id)
68
- true
68
+ commit_id
69
69
  end
70
70
 
71
71
  def commit(commit_message)
@@ -1,3 +1,3 @@
1
1
  module Au
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: au
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edward Du
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-11-24 00:00:00.000000000 Z
13
+ date: 2018-12-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: thor
@@ -109,6 +109,7 @@ files:
109
109
  - ".gitignore"
110
110
  - ".rspec"
111
111
  - ".ruby-version"
112
+ - Design_Document.md
112
113
  - Gemfile
113
114
  - Gemfile.lock
114
115
  - LICENSE.txt