au 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +209 -0
- data/.rspec +3 -0
- data/.ruby-version +1 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +45 -0
- data/LICENSE.txt +21 -0
- data/README.md +98 -0
- data/Rakefile +6 -0
- data/au.gemspec +40 -0
- data/bin/au +170 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/au.rb +14 -0
- data/lib/au/misc/load_pstore.rb +13 -0
- data/lib/au/models/commit.rb +259 -0
- data/lib/au/models/diff.rb +69 -0
- data/lib/au/models/document.rb +104 -0
- data/lib/au/models/repository.rb +254 -0
- data/lib/au/models/staging.rb +91 -0
- data/lib/au/patches/object.rb +12 -0
- data/lib/au/version.rb +3 -0
- metadata +155 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8e518fc6352a564efdca3da72b466c5d9b77eb2c735305e1d584383206088671
|
4
|
+
data.tar.gz: e0ff19709aa951e5f5e02f7902bafcfe20310dcd18e28b7587cf72e610796e91
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 68e8f95de2d98f317389027fb69433fbbdd3fd4cf5043ddb2ddb0ce910e43f6c15adfa3adc809073ea44f2793608200b4f952ad8021eb106e4ec743fa69c637c
|
7
|
+
data.tar.gz: 92d5ac6ef1685e887c2e0daf0498068bdf448418429c97fb6f81739e759a41d02bd28beadc9fbf82c91c528489498dcfe8aad65988cade54b34b5192bbc001cc
|
data/.gitignore
ADDED
@@ -0,0 +1,209 @@
|
|
1
|
+
|
2
|
+
# Created by https://www.gitignore.io/api/ruby,linux,macos,windows,rubymine
|
3
|
+
|
4
|
+
### Linux ###
|
5
|
+
*~
|
6
|
+
|
7
|
+
# temporary files which can be created if a process still has a handle open of a deleted file
|
8
|
+
.fuse_hidden*
|
9
|
+
|
10
|
+
# KDE directory preferences
|
11
|
+
.directory
|
12
|
+
|
13
|
+
# Linux trash folder which might appear on any partition or disk
|
14
|
+
.Trash-*
|
15
|
+
|
16
|
+
# .nfs files are created when an open file is removed but is still being accessed
|
17
|
+
.nfs*
|
18
|
+
|
19
|
+
### macOS ###
|
20
|
+
# General
|
21
|
+
.DS_Store
|
22
|
+
.AppleDouble
|
23
|
+
.LSOverride
|
24
|
+
|
25
|
+
# Icon must end with two \r
|
26
|
+
Icon
|
27
|
+
|
28
|
+
# Thumbnails
|
29
|
+
._*
|
30
|
+
|
31
|
+
# Files that might appear in the root of a volume
|
32
|
+
.DocumentRevisions-V100
|
33
|
+
.fseventsd
|
34
|
+
.Spotlight-V100
|
35
|
+
.TemporaryItems
|
36
|
+
.Trashes
|
37
|
+
.VolumeIcon.icns
|
38
|
+
.com.apple.timemachine.donotpresent
|
39
|
+
|
40
|
+
# Directories potentially created on remote AFP share
|
41
|
+
.AppleDB
|
42
|
+
.AppleDesktop
|
43
|
+
Network Trash Folder
|
44
|
+
Temporary Items
|
45
|
+
.apdisk
|
46
|
+
|
47
|
+
### Ruby ###
|
48
|
+
*.gem
|
49
|
+
*.rbc
|
50
|
+
/.config
|
51
|
+
/coverage/
|
52
|
+
/InstalledFiles
|
53
|
+
/pkg/
|
54
|
+
/spec/reports/
|
55
|
+
/spec/examples.txt
|
56
|
+
/test/tmp/
|
57
|
+
/test/version_tmp/
|
58
|
+
/tmp/
|
59
|
+
|
60
|
+
# Used by dotenv library to load environment variables.
|
61
|
+
# .env
|
62
|
+
|
63
|
+
## Specific to RubyMotion:
|
64
|
+
.dat*
|
65
|
+
.repl_history
|
66
|
+
build/
|
67
|
+
*.bridgesupport
|
68
|
+
build-iPhoneOS/
|
69
|
+
build-iPhoneSimulator/
|
70
|
+
|
71
|
+
## Specific to RubyMotion (use of CocoaPods):
|
72
|
+
#
|
73
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
74
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
75
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
76
|
+
#
|
77
|
+
# vendor/Pods/
|
78
|
+
|
79
|
+
## Documentation cache and generated files:
|
80
|
+
/.yardoc/
|
81
|
+
/_yardoc/
|
82
|
+
/doc/
|
83
|
+
/rdoc/
|
84
|
+
|
85
|
+
## Environment normalization:
|
86
|
+
/.bundle/
|
87
|
+
/vendor/bundle
|
88
|
+
/lib/bundler/man/
|
89
|
+
|
90
|
+
# for a library or gem, you might want to ignore these files since the code is
|
91
|
+
# intended to run in multiple environments; otherwise, check them in:
|
92
|
+
# Gemfile.lock
|
93
|
+
# .ruby-version
|
94
|
+
# .ruby-gemset
|
95
|
+
|
96
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
97
|
+
.rvmrc
|
98
|
+
|
99
|
+
### RubyMine ###
|
100
|
+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
|
101
|
+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
102
|
+
|
103
|
+
# User-specific stuff
|
104
|
+
.idea/**/workspace.xml
|
105
|
+
.idea/**/tasks.xml
|
106
|
+
.idea/**/usage.statistics.xml
|
107
|
+
.idea/**/dictionaries
|
108
|
+
.idea/**/shelf
|
109
|
+
|
110
|
+
# Generated files
|
111
|
+
.idea/**/contentModel.xml
|
112
|
+
|
113
|
+
# Sensitive or high-churn files
|
114
|
+
.idea/**/dataSources/
|
115
|
+
.idea/**/dataSources.ids
|
116
|
+
.idea/**/dataSources.local.xml
|
117
|
+
.idea/**/sqlDataSources.xml
|
118
|
+
.idea/**/dynamic.xml
|
119
|
+
.idea/**/uiDesigner.xml
|
120
|
+
.idea/**/dbnavigator.xml
|
121
|
+
|
122
|
+
# Gradle
|
123
|
+
.idea/**/gradle.xml
|
124
|
+
.idea/**/libraries
|
125
|
+
.idea/**/*
|
126
|
+
# Gradle and Maven with auto-import
|
127
|
+
# When using Gradle or Maven with auto-import, you should exclude module files,
|
128
|
+
# since they will be recreated, and may cause churn. Uncomment if using
|
129
|
+
# auto-import.
|
130
|
+
# .idea/modules.xml
|
131
|
+
# .idea/*.iml
|
132
|
+
# .idea/modules
|
133
|
+
|
134
|
+
# CMake
|
135
|
+
cmake-build-*/
|
136
|
+
|
137
|
+
# Mongo Explorer plugin
|
138
|
+
.idea/**/mongoSettings.xml
|
139
|
+
|
140
|
+
# File-based project format
|
141
|
+
*.iws
|
142
|
+
|
143
|
+
# IntelliJ
|
144
|
+
out/
|
145
|
+
|
146
|
+
# mpeltonen/sbt-idea plugin
|
147
|
+
.idea_modules/
|
148
|
+
|
149
|
+
# JIRA plugin
|
150
|
+
atlassian-ide-plugin.xml
|
151
|
+
|
152
|
+
# Cursive Clojure plugin
|
153
|
+
.idea/replstate.xml
|
154
|
+
|
155
|
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
156
|
+
com_crashlytics_export_strings.xml
|
157
|
+
crashlytics.properties
|
158
|
+
crashlytics-build.properties
|
159
|
+
fabric.properties
|
160
|
+
|
161
|
+
# Editor-based Rest Client
|
162
|
+
.idea/httpRequests
|
163
|
+
|
164
|
+
# Android studio 3.1+ serialized cache file
|
165
|
+
.idea/caches/build_file_checksums.ser
|
166
|
+
|
167
|
+
### RubyMine Patch ###
|
168
|
+
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
|
169
|
+
|
170
|
+
# *.iml
|
171
|
+
# modules.xml
|
172
|
+
# .idea/misc.xml
|
173
|
+
# *.ipr
|
174
|
+
|
175
|
+
# Sonarlint plugin
|
176
|
+
.idea/sonarlint
|
177
|
+
|
178
|
+
### Windows ###
|
179
|
+
# Windows thumbnail cache files
|
180
|
+
Thumbs.db
|
181
|
+
ehthumbs.db
|
182
|
+
ehthumbs_vista.db
|
183
|
+
|
184
|
+
# Dump file
|
185
|
+
*.stackdump
|
186
|
+
|
187
|
+
# Folder config file
|
188
|
+
[Dd]esktop.ini
|
189
|
+
|
190
|
+
# Recycle Bin used on file shares
|
191
|
+
$RECYCLE.BIN/
|
192
|
+
|
193
|
+
# Windows Installer files
|
194
|
+
*.cab
|
195
|
+
*.msi
|
196
|
+
*.msix
|
197
|
+
*.msm
|
198
|
+
*.msp
|
199
|
+
|
200
|
+
# Windows shortcuts
|
201
|
+
*.lnk
|
202
|
+
|
203
|
+
|
204
|
+
# End of https://www.gitignore.io/api/ruby,linux,macos,windows,rubymine
|
205
|
+
|
206
|
+
.au/**/*
|
207
|
+
|
208
|
+
# au playground
|
209
|
+
test_tmp/**/*
|
data/.rspec
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.5.0
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
au (0.1.0)
|
5
|
+
colorize
|
6
|
+
thor
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
coderay (1.1.2)
|
12
|
+
colorize (0.8.1)
|
13
|
+
diff-lcs (1.3)
|
14
|
+
method_source (0.9.2)
|
15
|
+
pry (0.12.2)
|
16
|
+
coderay (~> 1.1.0)
|
17
|
+
method_source (~> 0.9.0)
|
18
|
+
rake (10.5.0)
|
19
|
+
rspec (3.8.0)
|
20
|
+
rspec-core (~> 3.8.0)
|
21
|
+
rspec-expectations (~> 3.8.0)
|
22
|
+
rspec-mocks (~> 3.8.0)
|
23
|
+
rspec-core (3.8.0)
|
24
|
+
rspec-support (~> 3.8.0)
|
25
|
+
rspec-expectations (3.8.2)
|
26
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
27
|
+
rspec-support (~> 3.8.0)
|
28
|
+
rspec-mocks (3.8.0)
|
29
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
30
|
+
rspec-support (~> 3.8.0)
|
31
|
+
rspec-support (3.8.0)
|
32
|
+
thor (0.20.3)
|
33
|
+
|
34
|
+
PLATFORMS
|
35
|
+
ruby
|
36
|
+
|
37
|
+
DEPENDENCIES
|
38
|
+
au!
|
39
|
+
bundler (~> 1.16)
|
40
|
+
pry
|
41
|
+
rake (~> 10.0)
|
42
|
+
rspec (= 3.8.0)
|
43
|
+
|
44
|
+
BUNDLED WITH
|
45
|
+
1.17.1
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 zino
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
# Au
|
2
|
+
|
3
|
+
Distributed version control system for CS253/453 at the University of Rochester.
|
4
|
+
|
5
|
+
'Au' is the chemical element commonly known as 'gold'. It has an atomic number of
|
6
|
+
79, one less than mercurial. We chose this name with deference to Mercurial. It also
|
7
|
+
has the same pronunciation with the Chinese colloquial expression '哎呦' or '矮油', the
|
8
|
+
literal translation of which can be loosely interpreted as 'wow' (as in Jay Chou's '哎呦不错喔').
|
9
|
+
|
10
|
+
## Team
|
11
|
+
|
12
|
+
* [Edward Du](https://github.com/LeveyLeonhardt)
|
13
|
+
* [Zino Hu](https://github.com/zinosama)
|
14
|
+
* [Hubert Lee](https://github.com/hubertlee915)
|
15
|
+
|
16
|
+
## Installation
|
17
|
+
|
18
|
+
$ gem install au
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
```
|
23
|
+
Commands:
|
24
|
+
au cat COMMIT_ID PATH
|
25
|
+
# Display file from a provided commit.
|
26
|
+
|
27
|
+
au checkout COMMIT_ID
|
28
|
+
# Check out a commit. Similar behavior with git checkout.
|
29
|
+
|
30
|
+
au clone REMOTE_PATH [optional: LOCAL_PATH]
|
31
|
+
# Copy an existing repo from the provided remote path.
|
32
|
+
|
33
|
+
au commit [-m MESSAGE]
|
34
|
+
# Commit already staged files. Use -m to provide commit message.
|
35
|
+
|
36
|
+
au diff PATH
|
37
|
+
# Display diff between the file state from HEAD and from presence.
|
38
|
+
|
39
|
+
au heads
|
40
|
+
# Display ids of commits that don't have children.
|
41
|
+
|
42
|
+
au help [COMMAND]
|
43
|
+
# Describe available commands or one specific command
|
44
|
+
|
45
|
+
au init
|
46
|
+
# Start tracking current directory
|
47
|
+
|
48
|
+
au log
|
49
|
+
# Display parent commits. Only true lineage is displayed, meaning that
|
50
|
+
# the second parents from merged commits are ignored.
|
51
|
+
|
52
|
+
au merge COMMIT_ID
|
53
|
+
# Merge with provided commit.
|
54
|
+
|
55
|
+
au pull REMOTE_PATH
|
56
|
+
# Pull changes from remote repo.
|
57
|
+
|
58
|
+
au push REMOTE_PATH
|
59
|
+
# Push changes to remote repo.
|
60
|
+
|
61
|
+
au reset
|
62
|
+
# Remove all history from the project.
|
63
|
+
|
64
|
+
au stage PATH
|
65
|
+
# Stage one or more files for commit. If a dir path is provided, all files within the
|
66
|
+
# dir are staged.
|
67
|
+
|
68
|
+
au status
|
69
|
+
# Check current status of repo. Displays staged and unstaged files, as well as
|
70
|
+
# current HEAD ID.
|
71
|
+
|
72
|
+
au unstage PATHS
|
73
|
+
# Remove one or more files from the staging area.
|
74
|
+
```
|
75
|
+
|
76
|
+
## Development
|
77
|
+
|
78
|
+
`gem install bundler` to install bundler
|
79
|
+
|
80
|
+
`bundle install` to install all dependencies
|
81
|
+
|
82
|
+
`bundle exec rspec` to run rspec tests
|
83
|
+
|
84
|
+
-----
|
85
|
+
|
86
|
+
`bundle exec au init` to init
|
87
|
+
|
88
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
89
|
+
|
90
|
+
To install this gem onto your local machine, run `bundle exec rake install`. 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).
|
91
|
+
|
92
|
+
## Contributing
|
93
|
+
|
94
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/hubertlee915/au.
|
95
|
+
|
96
|
+
## License
|
97
|
+
|
98
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/au.gemspec
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
lib = File.expand_path("../lib", __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "au/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'au'
|
7
|
+
spec.version = Au::VERSION
|
8
|
+
spec.authors = ['Edward Du', 'Zino Hu', 'Hubert Li']
|
9
|
+
spec.email = ['zhiheng.li@rochester.edu', 'ydu14@u.rochester.edu', 'zino@codes@gmail.com']
|
10
|
+
|
11
|
+
spec.summary = %q{Distributed version control}
|
12
|
+
spec.description = %q{Yet another distributed version control system}
|
13
|
+
spec.homepage = "https://github.com/hubertlee915/DVCS"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
17
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
18
|
+
if spec.respond_to?(:metadata)
|
19
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
20
|
+
else
|
21
|
+
raise "RubyGems 2.0 or newer is required to protect against " \
|
22
|
+
"public gem pushes."
|
23
|
+
end
|
24
|
+
|
25
|
+
# Specify which files should be added to the gem when it is released.
|
26
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
27
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
28
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
29
|
+
end
|
30
|
+
spec.bindir = 'bin'
|
31
|
+
spec.executables = ['au']
|
32
|
+
spec.require_paths = ['lib']
|
33
|
+
|
34
|
+
spec.add_dependency 'thor'
|
35
|
+
spec.add_dependency 'colorize'
|
36
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
37
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
38
|
+
spec.add_development_dependency "rspec", "3.8.0"
|
39
|
+
spec.add_development_dependency "pry"
|
40
|
+
end
|