supso 0.10.0
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 +7 -0
- data/.gitignore +14 -0
- data/.rspec +2 -0
- data/DEV_README.md +28 -0
- data/Gemfile +3 -0
- data/LICENSE.txt +8 -0
- data/README.md +25 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/bin/supso +6 -0
- data/docs/README.md +7 -0
- data/docs/commands/README.md +14 -0
- data/docs/commands/help.md +10 -0
- data/docs/commands/login.md +10 -0
- data/docs/commands/logout.md +7 -0
- data/docs/commands/show.md +21 -0
- data/docs/commands/update.md +7 -0
- data/docs/commands/version.md +12 -0
- data/docs/commands/whoami.md +5 -0
- data/docs/contents.yml +17 -0
- data/docs/errors/README.md +6 -0
- data/docs/errors/invalid_project_token.md +4 -0
- data/docs/errors/missing_project_token.md +4 -0
- data/docs/overview/README.md +16 -0
- data/docs/overview/getting_started.md +15 -0
- data/lib/helpers/module_vars.rb +19 -0
- data/lib/other/supso2.pub +9 -0
- data/lib/super_source/project.rb +9 -0
- data/lib/supso/commands.rb +155 -0
- data/lib/supso/config.rb +16 -0
- data/lib/supso/javascript.rb +57 -0
- data/lib/supso/logs.rb +49 -0
- data/lib/supso/organization.rb +95 -0
- data/lib/supso/project.rb +218 -0
- data/lib/supso/updater.rb +91 -0
- data/lib/supso/user.rb +161 -0
- data/lib/supso/util.rb +129 -0
- data/lib/supso/version.rb +8 -0
- data/lib/supso.rb +31 -0
- data/lib/templates/project_dir_readme.txt +44 -0
- data/lib/templates/user_dir_readme.txt +8 -0
- data/supso.gemspec +26 -0
- metadata +145 -0
data/lib/supso.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'json'
|
2
|
+
require 'uri'
|
3
|
+
require 'net/http'
|
4
|
+
|
5
|
+
Dir[File.dirname(__FILE__) + '/helpers/*.rb'].each do |file|
|
6
|
+
require file
|
7
|
+
end
|
8
|
+
|
9
|
+
Dir[File.dirname(__FILE__) + '/supso/*.rb'].each do |file|
|
10
|
+
require file
|
11
|
+
end
|
12
|
+
|
13
|
+
module Supso
|
14
|
+
extend ModuleVars
|
15
|
+
|
16
|
+
env = ENV['ENV'] || "development"
|
17
|
+
create_module_var("environment", env)
|
18
|
+
|
19
|
+
spec = Gem::Specification.find_by_name("supso")
|
20
|
+
|
21
|
+
create_module_var("gem_root", spec.gem_dir)
|
22
|
+
create_module_var("project_root", Util.detect_project_root)
|
23
|
+
create_module_var("project_supso_config_root", Supso.project_root ? Supso.project_root + '/.supso' : nil)
|
24
|
+
create_module_var("user_supso_config_root", "#{ Dir.home }/.supso")
|
25
|
+
FileUtils.mkdir_p(Supso.user_supso_config_root)
|
26
|
+
create_module_var("supso_api_root", "https://supso.org/api/v1/")
|
27
|
+
|
28
|
+
create_module_var("config", {})
|
29
|
+
|
30
|
+
Supso::Config.load_config!
|
31
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
README FOR SUPPORTED SOURCE PROJECT DIRECTORY
|
2
|
+
---------------------------------------------
|
3
|
+
|
4
|
+
1. What is this directory?
|
5
|
+
|
6
|
+
This directory contains information connecting your user or organization with Super Source projects you use. If you've never heard of Super Source, it's probably being included from a project you're using.
|
7
|
+
|
8
|
+
|
9
|
+
2. Should I check this into version control?
|
10
|
+
|
11
|
+
Is this a private repository you are sharing with your teammates, or is it a public repository you want others to use (like an open source project)?
|
12
|
+
|
13
|
+
If it is a private repository to share amongst a team, you should check this directory into your version control. The files are needed by your teammates in order to run properly.
|
14
|
+
|
15
|
+
If it is a public repository, such as that of an open source project, you should not check the file into version control. Add .supso to your .gitignore, if you use git.
|
16
|
+
|
17
|
+
|
18
|
+
3. What is Super Source?
|
19
|
+
|
20
|
+
Super Source is a platform for projects to learn who their users are. You can learn more about this at supso.org
|
21
|
+
|
22
|
+
|
23
|
+
4. How's it work?
|
24
|
+
|
25
|
+
A project that includes Super Source will ask the developers to run `supso update` in order to get a token associated with their use of the project. The first time you run supso update, you also have to provide your email address.
|
26
|
+
|
27
|
+
A confirmation token is sent to the email address. After confirming you are who you say you are, the `supso update` command will store client tokens for each project in this directory. These client tokens are used to verify the process completion.
|
28
|
+
|
29
|
+
|
30
|
+
5. Does everyone on my team need to get a Super Source account?
|
31
|
+
|
32
|
+
No, only one person needs to. You'll just need to get the project's client tokens by running `supso update` then check this directory into your version control. It doesn't hurt if multiple people do it, however, as long as they're all associated with the same organization.
|
33
|
+
|
34
|
+
|
35
|
+
6. Do I really have to use my real email address?
|
36
|
+
|
37
|
+
A confirmation token is sent to your email address, so yes, you really should.
|
38
|
+
|
39
|
+
|
40
|
+
7. Why should I care?
|
41
|
+
|
42
|
+
Project owners include Super Source in their projects for good reason. They're investing a lot of their time and energy into creating and maintaing the projects. In return, they're just asking to know who's using their project. They might also want to email you for various reasons, like asking how you're using the project or to understand what to prioritize next on the development roadmap. And, like all email platforms, you're free to opt out of receiving messages from the project.
|
43
|
+
|
44
|
+
In summary, these project owners are doing a lot of work for your benefit - the least you can do is help them understand who's using their project!
|
@@ -0,0 +1,8 @@
|
|
1
|
+
README FOR SUPPORTED SOURCE USER DIRECTORY
|
2
|
+
------------------------------------------
|
3
|
+
|
4
|
+
This directory contains your user information for Super Source. If you've never heard of Super Source, it's probably being included from a project you're using.
|
5
|
+
|
6
|
+
Super Source is a platform for projects to learn who their users are. You can learn more about this at supso.org
|
7
|
+
|
8
|
+
To log out as the current user, get the supso command line interface, then run `supso logout`. If you're not even sure who you're logged in as, you can run `supso whoami`.
|
data/supso.gemspec
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'supso/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.authors = ["Super Source"]
|
8
|
+
spec.description = "The command line interface for Super Source (supso)."
|
9
|
+
spec.email = ["admin@supso.org"]
|
10
|
+
spec.executables = ["supso"]
|
11
|
+
spec.homepage = "http://supso.org/"
|
12
|
+
spec.name = "supso"
|
13
|
+
spec.summary = "The command line interface for Super Source - supso."
|
14
|
+
spec.version = Supso::VERSION
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) || f.match(%r{supported_source}) }
|
17
|
+
spec.bindir = "bin"
|
18
|
+
spec.require_paths = ["lib"]
|
19
|
+
|
20
|
+
spec.post_install_message = "You've installed supso, the command line interface for Super Source.\nTo get the client tokens for a project, run `supso update` from inside the project's directory.\nFor more info, run `supso help` or visit supso.org"
|
21
|
+
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
23
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
24
|
+
spec.add_development_dependency "rspec", "~> 3.3"
|
25
|
+
spec.add_dependency "super_source", ">= 0.10.0"
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,145 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: supso
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.10.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Super Source
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-03-27 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.6'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.3'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.3'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: super_source
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.10.0
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.10.0
|
69
|
+
description: The command line interface for Super Source (supso).
|
70
|
+
email:
|
71
|
+
- admin@supso.org
|
72
|
+
executables:
|
73
|
+
- supso
|
74
|
+
extensions: []
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- ".gitignore"
|
78
|
+
- ".rspec"
|
79
|
+
- DEV_README.md
|
80
|
+
- Gemfile
|
81
|
+
- LICENSE.txt
|
82
|
+
- README.md
|
83
|
+
- Rakefile
|
84
|
+
- bin/console
|
85
|
+
- bin/setup
|
86
|
+
- bin/supso
|
87
|
+
- docs/README.md
|
88
|
+
- docs/commands/README.md
|
89
|
+
- docs/commands/help.md
|
90
|
+
- docs/commands/login.md
|
91
|
+
- docs/commands/logout.md
|
92
|
+
- docs/commands/show.md
|
93
|
+
- docs/commands/update.md
|
94
|
+
- docs/commands/version.md
|
95
|
+
- docs/commands/whoami.md
|
96
|
+
- docs/contents.yml
|
97
|
+
- docs/errors/README.md
|
98
|
+
- docs/errors/invalid_project_token.md
|
99
|
+
- docs/errors/missing_project_token.md
|
100
|
+
- docs/overview/README.md
|
101
|
+
- docs/overview/getting_started.md
|
102
|
+
- lib/helpers/module_vars.rb
|
103
|
+
- lib/other/supso2.pub
|
104
|
+
- lib/super_source/project.rb
|
105
|
+
- lib/supso.rb
|
106
|
+
- lib/supso/commands.rb
|
107
|
+
- lib/supso/config.rb
|
108
|
+
- lib/supso/javascript.rb
|
109
|
+
- lib/supso/logs.rb
|
110
|
+
- lib/supso/organization.rb
|
111
|
+
- lib/supso/project.rb
|
112
|
+
- lib/supso/updater.rb
|
113
|
+
- lib/supso/user.rb
|
114
|
+
- lib/supso/util.rb
|
115
|
+
- lib/supso/version.rb
|
116
|
+
- lib/templates/project_dir_readme.txt
|
117
|
+
- lib/templates/user_dir_readme.txt
|
118
|
+
- supso.gemspec
|
119
|
+
homepage: http://supso.org/
|
120
|
+
licenses: []
|
121
|
+
metadata: {}
|
122
|
+
post_install_message: |-
|
123
|
+
You've installed supso, the command line interface for Super Source.
|
124
|
+
To get the client tokens for a project, run `supso update` from inside the project's directory.
|
125
|
+
For more info, run `supso help` or visit supso.org
|
126
|
+
rdoc_options: []
|
127
|
+
require_paths:
|
128
|
+
- lib
|
129
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
130
|
+
requirements:
|
131
|
+
- - ">="
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
requirements: []
|
140
|
+
rubyforge_project:
|
141
|
+
rubygems_version: 2.6.8
|
142
|
+
signing_key:
|
143
|
+
specification_version: 4
|
144
|
+
summary: The command line interface for Super Source - supso.
|
145
|
+
test_files: []
|