gsm-sources-manager 1.0.0.alpha3

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.
@@ -0,0 +1,9 @@
1
+ language: ruby
2
+ cache: bundler
3
+ rvm:
4
+ - 2.3.0
5
+ env:
6
+ - GSM_TEST_MODE=CI
7
+ addons:
8
+ code_climate:
9
+ repo_token: a3b92a7e935316eab6293228fa587784c95b9dd10ab61adb4fdb9ecb6ca330d8
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+ gemspec
3
+
4
+ gem "rake"
@@ -0,0 +1,35 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ gsm-sources-manager (1.0.0.alpha2)
5
+ mercenary (~> 0.3.6)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ codeclimate-test-reporter (0.6.0)
11
+ simplecov (>= 0.7.1, < 1.0.0)
12
+ docile (1.1.5)
13
+ json (2.0.2)
14
+ mercenary (0.3.6)
15
+ minitest (5.9.1)
16
+ rake (11.3.0)
17
+ shoulda-context (1.2.1)
18
+ simplecov (0.12.0)
19
+ docile (~> 1.1.0)
20
+ json (>= 1.8, < 3)
21
+ simplecov-html (~> 0.10.0)
22
+ simplecov-html (0.10.0)
23
+
24
+ PLATFORMS
25
+ ruby
26
+
27
+ DEPENDENCIES
28
+ codeclimate-test-reporter
29
+ gsm-sources-manager!
30
+ minitest
31
+ rake
32
+ shoulda-context
33
+
34
+ BUNDLED WITH
35
+ 1.13.2
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2016 David Zhang
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 all
13
+ 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 THE
21
+ SOFTWARE.
@@ -0,0 +1,69 @@
1
+ # GSM Sources Manager for Ruby Gems
2
+
3
+ ![](https://img.shields.io/badge/license-MIT-blue.svg)
4
+ [![](https://api.travis-ci.org/crispgm/gsm.svg)](https://travis-ci.org/crispgm/gsm)
5
+ [![Code Climate](https://codeclimate.com/github/crispgm/gsm/badges/gpa.svg)](https://codeclimate.com/github/crispgm/gsm)
6
+ [![Test Coverage](https://codeclimate.com/github/crispgm/gsm/badges/coverage.svg)](https://codeclimate.com/github/crispgm/gsm/coverage)
7
+ [![Join the chat at https://gitter.im/crispgm/gsm](https://badges.gitter.im/crispgm/gsm.svg)](https://gitter.im/crispgm/gsm?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
8
+ [![BADGINATOR](https://badginator.herokuapp.com/crispgm/gsm.svg)](https://github.com/defunctzombie/badginator)
9
+
10
+ GSM is a simple sources manager for RubyGems. GSM means GSM Sources Manager as a recursive acronym or simply Gem Sources Manager.
11
+
12
+ In Ruby development, we always need alternative RubyGems source in special networks. e.g. In China Mainland, you know. GSM helps get your gem sources managed.
13
+
14
+ ## Installation
15
+
16
+ ### Install with RubyGems
17
+
18
+ ```
19
+ $ gem install gsm-sources-manager
20
+ $ gsm --version
21
+ ```
22
+
23
+ ### Or, you may install manually
24
+
25
+ ```
26
+ $ git clone https://github.com/crispgm/gsm.git
27
+ $ bundle install
28
+ $ bundle exec exe/gsm --version
29
+ ```
30
+
31
+ ## Usage
32
+
33
+ ```
34
+ Usage:
35
+
36
+ gsm <subcommand> [options]
37
+
38
+ Options:
39
+ -h, --help Show this message
40
+ -v, --version Print the name and version
41
+ -t, --trace Show the full backtrace when an error occurs
42
+
43
+ Subcommands:
44
+ list List all sources
45
+ use Use source
46
+ add Add source
47
+ del Delete source
48
+ reset Reset all sources
49
+ mirror Mirror source for Bundler
50
+ help Show usage
51
+ ```
52
+
53
+ See <https://crispgm.github.io/gsm/#guide> for details.
54
+
55
+ ## API Reference
56
+
57
+ TODO: API Reference of `libgsm`.
58
+
59
+ ## Sources
60
+
61
+ * [RubyGems](https://rubygems.org/)
62
+ * [RubyChina](https://gems.ruby-china.org/)
63
+ * [Taobao](https://ruby.taobao.org/)
64
+
65
+ ## Contributing
66
+
67
+ * [GSM Sources Manager](https://github.com/crispgm/gsm) is licensed under [MIT License](/LICENSE).
68
+ * If there is a bug, you may [file an issue](https://github.com/crispgm/gsm/issues/new) or pull request directly.
69
+ * Pull requests for contribution is welcomed.
@@ -0,0 +1,24 @@
1
+ # coding: utf-8
2
+
3
+ task default: %w[test]
4
+
5
+ require 'rake/testtask'
6
+
7
+ Rake::TestTask.new do |t|
8
+ t.libs << 'test'
9
+ t.test_files = FileList['test/test_*.rb']
10
+ t.verbose = true
11
+ end
12
+
13
+ task :count do
14
+ files = `git ls-files -z`.split("\x0")
15
+ shell_cmd = "wc -l "
16
+ files.grep(%r{^(exe|lib|test)/}).grep(%r{exe|.rb}).each do |f|
17
+ shell_cmd << f << " \\\n"
18
+ end
19
+ begin
20
+ sh shell_cmd[0..-3]
21
+ rescue
22
+ puts "Count Error."
23
+ end
24
+ end
@@ -0,0 +1 @@
1
+ /_site/
@@ -0,0 +1 @@
1
+ baseurl: "/gsm"
@@ -0,0 +1,3 @@
1
+ - version: 1.0.0.alpha
2
+ changes:
3
+ - text: Initial Alpha Version
@@ -0,0 +1,87 @@
1
+ install: |
2
+ ## Install with RubyGems
3
+
4
+ ```shell
5
+ $ gem install gsm-sources-manager
6
+ $ gsm --version
7
+ ```
8
+
9
+ ## Or, you may install manually
10
+
11
+ ```
12
+ $ git clone https://github.com/crispgm/gsm.git
13
+ $ bundle install
14
+ $ bundle exec exe/gsm --version
15
+ ```
16
+ guide: |
17
+ ## Getting Started
18
+
19
+ Once you have installed and run `gsm` with commands other than `--help` or `--version`, `gsm` will load sources from current `gem sources -l` you set.
20
+
21
+ ## Commands
22
+
23
+ ### List
24
+
25
+ List sources within `gsm`.
26
+
27
+ ```
28
+ $ gsm list
29
+ ```
30
+
31
+ ### Use
32
+
33
+ Use a source with `source_name`.
34
+
35
+ ```
36
+ $ gsm use Amethyst
37
+ ```
38
+
39
+ ### Add
40
+
41
+ Use a source with `source_name` and `source_url`.
42
+
43
+ `--use`: Use the input source as well. Equivalent to `gsm add` and then `gsm use`.
44
+
45
+ ```
46
+ $ gsm add Amethyst https://rubygems.org/
47
+ ```
48
+
49
+ ### Del
50
+
51
+ Delete a source with `source_name`.
52
+
53
+ ```
54
+ $ gsm del Amethyst
55
+ ```
56
+
57
+ ### Reset
58
+
59
+ Reset all sources.
60
+
61
+ ```
62
+ $ gsm reset
63
+ ```
64
+
65
+ ### Mirror
66
+
67
+ Mirror the source with `bundle`.
68
+
69
+ `--reset`: Reset mirror of bundle configuration.
70
+
71
+ ```
72
+ $ gsm mirror Amethyst
73
+ ```
74
+
75
+ ### Help
76
+
77
+ Show help info.
78
+
79
+ ```
80
+ $ gsm help
81
+ ```
82
+ contrib: |
83
+ [GSM Sources Manager](https://github.com/crispgm/gsm) is licensed under MIT License.
84
+
85
+ If there is a bug, you may [file an issue](https://github.com/crispgm/gsm/issues/new) or pull request directly.
86
+
87
+ Pull requests for contribution is welcomed.
@@ -0,0 +1,43 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Home | GSM Sources Manager</title>
7
+ <link rel="stylesheet" href="/gsm/css/style.css">
8
+ <script async defer src="https://buttons.github.io/buttons.js"></script>
9
+ <script src="https://crispgm.com/script/highlight.pack.js"></script>
10
+ <link rel="stylesheet" href="https://crispgm.com/css/zenburn.css">
11
+ <script>hljs.initHighlightingOnLoad();</script>
12
+ </head>
13
+ <body>
14
+ <div id="container">
15
+ <header id="topbar">
16
+ <div class="menu">
17
+ <div class="menu-item">
18
+ <a href="/gsm/">Home</a>
19
+ </div>
20
+ <div class="menu-item">
21
+ <a href="#install">Install</a>
22
+ </div>
23
+ <div class="menu-item">
24
+ <a href="#guide">Guide</a>
25
+ </div>
26
+ <div class="menu-item">
27
+ <a href="#changelog">Changelog</a>
28
+ </div>
29
+ <div class="menu-item">
30
+ <a href="#contributing">Contributing</a>
31
+ </div>
32
+ </div>
33
+ <div class="title">
34
+ GSM Sources Manager
35
+ </div>
36
+ </header>
37
+ {{ content }}
38
+ <footer>
39
+ Copyright &copy; 2016, <a href="https://crispgm.com/">David Zhang</a>.
40
+ </footer>
41
+ </div>
42
+ </body>
43
+ </html>
@@ -0,0 +1,177 @@
1
+ * {
2
+ box-sizing: border-box;
3
+ }
4
+ html {
5
+ width: 100%;
6
+ font-size: 16px;
7
+ }
8
+ @media (max-width: 48rem) {
9
+ html {
10
+ font-size: 12px;
11
+ }
12
+ }
13
+ body {
14
+ margin: 0;
15
+ font-family: "Helvetica Neue", Helvetica, Arial, "Hiragino Sans GB", "Microsoft Yahei", sans-serif;
16
+ font-size: 1rem;
17
+ -webkit-font-smoothing: antialiased;
18
+ color: #333;
19
+ background-color: #fbfbfb;
20
+ word-wrap: break-word;
21
+ text-align: center;
22
+ height: 100%;
23
+ line-height: 1.5rem;
24
+ }
25
+ img {
26
+ border: 0;
27
+ }
28
+ a {
29
+ text-decoration: none;
30
+ color: #06c;
31
+ }
32
+ a:hover {
33
+ text-decoration: underline;
34
+ }
35
+ pre.highlight {
36
+ border: .05rem solid #aaaaaa;
37
+ border-radius: .2rem;
38
+ font-family: Menlo, Monaco, "Source Code Pro", Consolas, Courier;
39
+ font-size: 1rem;
40
+ }
41
+ code.hljs {
42
+ padding: .8rem;
43
+ }
44
+ code.highlighter-rouge {
45
+ border: .05rem solid #aaaaaa;
46
+ border-radius: .2rem;
47
+ padding-left: .2rem;
48
+ padding-right: .2rem;
49
+ }
50
+ #container {
51
+ margin: 0 auto;
52
+ max-width: 48rem;
53
+ text-align: left;
54
+ }
55
+ @media (max-width: 48rem) {
56
+ #container {
57
+ padding-left: .5rem;
58
+ padding-right: .5rem;
59
+ }
60
+ }
61
+ #topbar {
62
+ height: 3rem;
63
+ padding-top: 1rem;
64
+ margin-bottom: 5rem;
65
+ }
66
+ .title {
67
+ font-weight: bold;
68
+ }
69
+ .menu {
70
+ float: right;
71
+ display: flex;
72
+ }
73
+ .menu-item {
74
+ padding-left: 1rem;
75
+ }
76
+ @media (max-width: 48rem) {
77
+ .title {
78
+ margin-top: 2rem;
79
+ text-align: center;
80
+ }
81
+ .menu {
82
+ float: none;
83
+ display: flex;
84
+ justify-content: space-around;
85
+ }
86
+ .menu-item {
87
+ padding: 0;
88
+ }
89
+ }
90
+ #intro {
91
+ text-align: center;
92
+ }
93
+ #intro-logo {
94
+ text-align: center;
95
+ }
96
+ #intro-logo img {
97
+ width: 10rem;
98
+ height: 10rem;
99
+ }
100
+ #intro-text {
101
+ margin-top: 6rem;
102
+ font-size: 2rem;
103
+ }
104
+ #intro-desc {
105
+ text-align: left;
106
+ margin-top: 2rem;
107
+ }
108
+ #intro-button {
109
+ margin-top: 5rem;
110
+ margin-left: auto;
111
+ margin-right: auto;
112
+ display: flex;
113
+ justify-content: center;
114
+ }
115
+ #intro-version {
116
+ margin-top: 1rem;
117
+ }
118
+ @media (max-width: 48rem) {
119
+ #intro-text {
120
+ margin-top: 3rem;
121
+ font-size: 1.1rem;
122
+ }
123
+ #intro-button {
124
+ margin-top: 2rem;
125
+ }
126
+ }
127
+ .install-item {
128
+ padding: 0rem 1rem 0rem 1rem;
129
+ font-size: 1.5rem;
130
+ line-height: 2.5rem;
131
+ color: #000;
132
+ background-color: #fff;
133
+ border: .15rem solid #000;
134
+ border-radius: .5rem;
135
+ }
136
+ .install-item:hover {
137
+ border: .15rem solid #06c;
138
+ }
139
+ .install-gsm {
140
+ margin-right: .5rem;
141
+ }
142
+ .install-user-guide {
143
+ margin-left: .5rem;
144
+ }
145
+ .install-item a {
146
+ color: #000;
147
+ }
148
+ .install-item:hover a {
149
+ color: #06c;
150
+ text-decoration: none;
151
+ }
152
+ .back-top {
153
+ text-align: center;
154
+ }
155
+ #social {
156
+ text-align: center;
157
+ margin-top: 1rem;
158
+ padding-bottom: 1rem;
159
+ border-bottom: solid #aaa .1rem;
160
+ }
161
+ .content {
162
+ padding-top: 3rem;
163
+ font-size: 1rem;
164
+ border-bottom: solid #aaa .1rem;
165
+ padding-bottom: 1.6rem;
166
+ }
167
+ .content-title {
168
+ text-align: center;
169
+ font-size: 2rem;
170
+ padding-bottom: 1rem;
171
+ }
172
+ footer {
173
+ /*text-align: center;*/
174
+ font-size: 1.2rem;
175
+ padding-top: 1rem;
176
+ padding-bottom: 1rem;
177
+ }