waggit 0.0.008 → 0.0.009

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,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NmViNzdlMTgxZTlmNjI5Y2UzZGVmYjM2MTczNTliMTRlMmZkNzc5MQ==
5
- data.tar.gz: !binary |-
6
- ZTM2MjBlOWMzMWQzMmJiYzFjNDc5Yzc1MDZlOTI1MjU5NjExYzZjMA==
2
+ SHA1:
3
+ metadata.gz: 32d0652e458a68d433a19dcbf7e0bcd86c9ceaa1
4
+ data.tar.gz: 4e4a1c2b5eff37579bfed6f2d1d128fb2f8a4d7e
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- ZjgyMzkxNzYxMDNiYjA2MWY0YjA0Yjc5MjcwMDBkZjhlZDE2ODQ0OGU3ZDdl
10
- ODhmZTA2MmZiYTM1NDljZjNmYzYyOTBlNjg2YjViOTFiNWQ1YzM2NGVlOWYz
11
- NDFiNDM1NzRlOGM4M2YwZTM5NTJiZGI5NWMzNjU1NWJjNDI1NGU=
12
- data.tar.gz: !binary |-
13
- MmRmYjAzZDQ2NjRjYjNiZDRjNTNlMGQ0MDE5YTQ3NjhmYWRmMTQ2YzJlZjBi
14
- ODg3NDA2ZjdiNzgzZGJiOTJiNjYwNmNiNWY2MjBiYTZiNmRmMmJjNDM1ODBk
15
- ZWNiNDc1NWFiYzZlZDlmMGE0YzFjNGFjNmQwNjdiMzA1YTEwZDY=
6
+ metadata.gz: d12ce726686cf38c08058b793c1ce41856142a56767cc5569b8834f7ba2fa5700a0c61689512f6177be0a2686cc64f7f56b11ea30f21ad72a40d8ff763087123
7
+ data.tar.gz: 9d46e28deacea8a733a374779f7da3b6115db00d19837c99b8e5c3cac108905756a6798aa3365380ce8f63ff34953c6b3f9ae8f150531eaea38b34624f9d1c36
data/bin/waggit CHANGED
@@ -19,8 +19,10 @@ when "s", "sync"
19
19
  Waggit.sync(options)
20
20
  when "f", "forcepush", "fp"
21
21
  Waggit.forcepush(options)
22
- when "p", "push"
22
+ when "push"
23
23
  Waggit.push(options)
24
+ when "pull"
25
+ Waggit.pull(options)
24
26
  when "c", "clean"
25
27
  Waggit.clean(options)
26
28
  else
@@ -1,7 +1,7 @@
1
1
 
2
2
  # Handles all direct interaction with Bash
3
3
  #
4
- class Command
4
+ module Command
5
5
 
6
6
  # Runs a command and returns the output
7
7
  #
@@ -1,6 +1,6 @@
1
1
  # Helper class for manipulating file system
2
2
  #
3
- class Files
3
+ module Files
4
4
 
5
5
  # If we have scss files that we edit, their compiled css equivalents need
6
6
  # to be deleted in order for wagon to recompile the scss
data/lib/git.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'command.rb'
2
2
 
3
- class Git
3
+ module Git
4
4
 
5
5
  @@wagon = "wagon-branch"
6
6
  @@local = "local-branch"
@@ -2,7 +2,7 @@ require 'git.rb'
2
2
  require 'wagon.rb'
3
3
  require 'files.rb'
4
4
 
5
- class Waggit
5
+ module Waggit
6
6
 
7
7
  # Verifies that the current working directory is setup to work with both git and wagon
8
8
  #
@@ -36,6 +36,43 @@ class Waggit
36
36
  puts Wagon.push(options)
37
37
  end
38
38
 
39
+ def self.pull(options)
40
+ begin
41
+ puts Git.checkout_master
42
+ puts Git.delete_wagon
43
+ puts Git.delete_local
44
+ puts Git.stash
45
+
46
+ puts Git.checkout_new_wagon
47
+ puts Wagon.pull(options)
48
+ #TODO: Checkout: http://stackoverflow.com/questions/3515597/git-add-only-non-whitespace-changes
49
+ if Git.has_changes?
50
+ puts Git.add_all
51
+ puts Git.commit "merge wagon pull"
52
+ end
53
+
54
+ puts Git.checkout_master
55
+ puts Git.rebase_wagon
56
+ puts Git.checkout_master
57
+ puts Git.merge_wagon
58
+
59
+ puts Git.checkout_new_local
60
+ puts Git.stash_pop
61
+ puts Git.add_all
62
+ puts Git.commit_prompt
63
+ puts Git.rebase_local
64
+ puts Git.checkout_master
65
+ puts Git.merge_local
66
+ puts Git.delete_wagon
67
+ puts Git.delete_local
68
+ rescue Exception
69
+ puts "Pull aborted, switching back to master branch"
70
+ puts Git.checkout_master
71
+ raise
72
+ end
73
+
74
+ end
75
+
39
76
  def self.sync(options)
40
77
  begin
41
78
  puts Git.checkout_master
@@ -1,6 +1,6 @@
1
1
  require 'command.rb'
2
2
 
3
- class Wagon
3
+ module Wagon
4
4
 
5
5
  # Converts the provided options into the appropriate
6
6
  # string to append to the wagon command.
metadata CHANGED
@@ -1,18 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: waggit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.008
4
+ version: 0.0.009
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mere Agency
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-29 00:00:00.000000000 Z
11
+ date: 2014-09-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A way of integrating LocomotiveCMS/Wagon with git. This is under development
14
14
  and not ready for active use.
15
- email: support@mereagency
15
+ email: support@mereagency.com
16
16
  executables:
17
17
  - waggit
18
18
  extensions: []
@@ -34,12 +34,12 @@ require_paths:
34
34
  - lib
35
35
  required_ruby_version: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - ! '>='
37
+ - - ">="
38
38
  - !ruby/object:Gem::Version
39
39
  version: '0'
40
40
  required_rubygems_version: !ruby/object:Gem::Requirement
41
41
  requirements:
42
- - - ! '>='
42
+ - - ">="
43
43
  - !ruby/object:Gem::Version
44
44
  version: '0'
45
45
  requirements: []