iww 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/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/LICENSE.txt +21 -0
- data/README.md +72 -0
- data/Rakefile +4 -0
- data/iww.gemspec +38 -0
- data/lib/iww/version.rb +5 -0
- data/lib/iww.rb +145 -0
- data/sig/iww.rbs +4 -0
- metadata +56 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 319681820f002c6ab97a7356942e375d72bb671ffab98f1ab744dc9903cdc190
|
4
|
+
data.tar.gz: e84777c3a7b8ff07333fbc0d2b48e965996f772a85f16c352cf96bf874fa8c15
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b68c3169a0c2cd96011de71e20a055d2d8bf367c68e81006ce57f29dd85a8b5d7c77c20f9583ac06e3281054c1e0b6e4bf6da9abd0ecd9b3736b53e942e9b69a
|
7
|
+
data.tar.gz: bedc89c475296a45ecf42440fe669718c61bd5afd629d5cf095b98f9fc7b314ba878fc15abfcd8dc3a2c966bdf845ac88f85e5ebabd0a81d46deeae8a54adf2f
|
data/CHANGELOG.md
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
6
|
+
|
7
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
8
|
+
|
9
|
+
## Our Standards
|
10
|
+
|
11
|
+
Examples of behavior that contributes to a positive environment for our community include:
|
12
|
+
|
13
|
+
* Demonstrating empathy and kindness toward other people
|
14
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
15
|
+
* Giving and gracefully accepting constructive feedback
|
16
|
+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
17
|
+
* Focusing on what is best not just for us as individuals, but for the overall community
|
18
|
+
|
19
|
+
Examples of unacceptable behavior include:
|
20
|
+
|
21
|
+
* The use of sexualized language or imagery, and sexual attention or
|
22
|
+
advances of any kind
|
23
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
24
|
+
* Public or private harassment
|
25
|
+
* Publishing others' private information, such as a physical or email
|
26
|
+
address, without their explicit permission
|
27
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
28
|
+
professional setting
|
29
|
+
|
30
|
+
## Enforcement Responsibilities
|
31
|
+
|
32
|
+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
33
|
+
|
34
|
+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
35
|
+
|
36
|
+
## Scope
|
37
|
+
|
38
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
39
|
+
|
40
|
+
## Enforcement
|
41
|
+
|
42
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at TODO: Write your email address. All complaints will be reviewed and investigated promptly and fairly.
|
43
|
+
|
44
|
+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
45
|
+
|
46
|
+
## Enforcement Guidelines
|
47
|
+
|
48
|
+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
49
|
+
|
50
|
+
### 1. Correction
|
51
|
+
|
52
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
53
|
+
|
54
|
+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
55
|
+
|
56
|
+
### 2. Warning
|
57
|
+
|
58
|
+
**Community Impact**: A violation through a single incident or series of actions.
|
59
|
+
|
60
|
+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
61
|
+
|
62
|
+
### 3. Temporary Ban
|
63
|
+
|
64
|
+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
65
|
+
|
66
|
+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
67
|
+
|
68
|
+
### 4. Permanent Ban
|
69
|
+
|
70
|
+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
71
|
+
|
72
|
+
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
73
|
+
|
74
|
+
## Attribution
|
75
|
+
|
76
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
|
77
|
+
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
78
|
+
|
79
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
80
|
+
|
81
|
+
[homepage]: https://www.contributor-covenant.org
|
82
|
+
|
83
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
84
|
+
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2024 TODO: Write your name
|
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,72 @@
|
|
1
|
+
# I.W.W. One Big Union
|
2
|
+
The Indistrial Workers of the World represent workers from a host of backgrounds and occupations brought together in the struggle for better conditions for all.
|
3
|
+
|
4
|
+
[more info](https://www.iww.org/)
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
### bundle
|
9
|
+
```
|
10
|
+
bundle add iww
|
11
|
+
```
|
12
|
+
|
13
|
+
### gem
|
14
|
+
```
|
15
|
+
gem install iww
|
16
|
+
```
|
17
|
+
|
18
|
+
### build
|
19
|
+
```
|
20
|
+
gem build iww.gemspec
|
21
|
+
```
|
22
|
+
|
23
|
+
|
24
|
+
## Usage
|
25
|
+
First, require the library:
|
26
|
+
```
|
27
|
+
require 'iww'
|
28
|
+
```
|
29
|
+
|
30
|
+
### Preample
|
31
|
+
The I.W.W. Constitution preamble.
|
32
|
+
```
|
33
|
+
Iww.preamble
|
34
|
+
```
|
35
|
+
|
36
|
+
### Join Link
|
37
|
+
A helpful link to become a member.
|
38
|
+
```
|
39
|
+
Iww.join!
|
40
|
+
```
|
41
|
+
|
42
|
+
### Images
|
43
|
+
The red and white logos, and the seal.
|
44
|
+
```
|
45
|
+
Iww.image
|
46
|
+
```
|
47
|
+
### Jobs
|
48
|
+
A list of represented jobs and industries.
|
49
|
+
```
|
50
|
+
Iww.jobs
|
51
|
+
```
|
52
|
+
|
53
|
+
### Search
|
54
|
+
Find the appropriate division based upon search.
|
55
|
+
```
|
56
|
+
##
|
57
|
+
# search object
|
58
|
+
Iww[123] # Search by division number.
|
59
|
+
Iww["123"] # Search by division number from a string.
|
60
|
+
Iww[:job] # Search by job as symbol.
|
61
|
+
Iww["division"] # Search by division as string.
|
62
|
+
|
63
|
+
...
|
64
|
+
|
65
|
+
##
|
66
|
+
# returns a hash with key of the divison number as a string and the division description also as a string.
|
67
|
+
{ "123" => "Division" }
|
68
|
+
```
|
69
|
+
|
70
|
+
## Interactive
|
71
|
+
You can also run `ruby bin/console` for an interactive prompt that will allow you to experiment.
|
72
|
+
|
data/Rakefile
ADDED
data/iww.gemspec
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/iww/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "iww"
|
7
|
+
spec.version = Iww::VERSION
|
8
|
+
spec.authors = ["Erik Olson"]
|
9
|
+
spec.email = ["xorgnak@gmail.com"]
|
10
|
+
|
11
|
+
spec.summary = "One big union for ruby."
|
12
|
+
spec.description = "A helpful ruby library to do union division lookups by job, number, or description."
|
13
|
+
spec.homepage = "https://github.com/xorgnak/iww"
|
14
|
+
spec.license = "MIT"
|
15
|
+
spec.required_ruby_version = ">= 2.6.0"
|
16
|
+
|
17
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
18
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
19
|
+
spec.metadata["changelog_uri"] = spec.homepage
|
20
|
+
|
21
|
+
# Specify which files should be added to the gem when it is released.
|
22
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
23
|
+
spec.files = Dir.chdir(__dir__) do
|
24
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
25
|
+
(File.expand_path(f) == __FILE__) ||
|
26
|
+
f.start_with?(*%w[bin/ test/ spec/ features/ .git appveyor Gemfile])
|
27
|
+
end
|
28
|
+
end
|
29
|
+
spec.bindir = "exe"
|
30
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
31
|
+
spec.require_paths = ["lib"]
|
32
|
+
|
33
|
+
# Uncomment to register a new dependency of your gem
|
34
|
+
# spec.add_dependency "example-gem", "~> 1.0"
|
35
|
+
|
36
|
+
# For more information and examples about making a new gem, check out our
|
37
|
+
# guide at: https://bundler.io/guides/creating_gem.html
|
38
|
+
end
|
data/lib/iww/version.rb
ADDED
data/lib/iww.rb
ADDED
@@ -0,0 +1,145 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "iww/version"
|
4
|
+
|
5
|
+
module Iww
|
6
|
+
class Error < StandardError; end
|
7
|
+
|
8
|
+
@@LOGO = {
|
9
|
+
white: %[https://www.iww.org/images/globe.svg],
|
10
|
+
red: %[https://www.iww.org/images/iww-globe-red.svg],
|
11
|
+
seal: %[https://www.iww.org/images/entitled-iww-logo-white.svg]
|
12
|
+
}
|
13
|
+
|
14
|
+
def self.image
|
15
|
+
@@LOGO
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.join!
|
19
|
+
%[https://redcard.iww.org/user/register]
|
20
|
+
end
|
21
|
+
|
22
|
+
@@OLD = [
|
23
|
+
%[The working class and the employing class have nothing in common.],
|
24
|
+
%[There can be no peace so long as hunger and want are found among millions of the working people and the few, who make up the employing class, have all the good things of life.],
|
25
|
+
%[Between these two classes a struggle must go on until the workers of the world organise as a class, take possession of the means of production, abolish the wage system, and live in harmony with the earth.],
|
26
|
+
%[We find that the centering of the management of industries into fewer and fewer hands makes the trade unions unable to cope with the evergrowing power of the employing class. The trade unions foster a state of affairs which allows one set of workers to be pitted against another set of workers in the same industry, thereby helping defeat one another in wage wars. Moreover, the trade unions aid the employing class to mislead the workers into the belief that the working class have interests in common with their employers.],
|
27
|
+
%[These conditions can be changed and the interest of the working class upheld only by an organization formed in such a way that all its members in any one industry, or in all industries if necessary, cease work whenever a strike or lockout is on in any department thereof, thus making an injury to one an injury to all.],
|
28
|
+
%[Instead of the conservative motto, ‘’A fair day’s wage for a fair day’s work,” we must inscribe on our banner the revolutionary watchword, ‘’Abolition of the wage system.”],
|
29
|
+
%[It is the historic mission of the working class to do away with capitalism. The army of prod uction must be organised, not only for everyday struggle with capitalists, but also to carry on production when capitalism shall have been overthrown. By organizing industrially we are forming the structure of the new society within the shell of the old.],
|
30
|
+
%[Knowing, therefore, that such an organization is absolutely necessary for emancipation, we unite under the following set of guiding principles and rules:]
|
31
|
+
]
|
32
|
+
|
33
|
+
def self.preamble
|
34
|
+
@@OLD
|
35
|
+
end
|
36
|
+
|
37
|
+
@@DIV = {
|
38
|
+
"110" => "Agricultural",
|
39
|
+
"120" => "Lumber",
|
40
|
+
"130" => "Fishery",
|
41
|
+
"140" => "Greenhouse",
|
42
|
+
"210" => "Mining",
|
43
|
+
"220" => "Energy",
|
44
|
+
"310" => "Civil Construction",
|
45
|
+
"330" => "Ship and Boat Builders",
|
46
|
+
"340" => "Building Maintenance and Landscaping",
|
47
|
+
"410" => "Textile and Leather",
|
48
|
+
"420" => "Wood Processing and Furniture",
|
49
|
+
"430" => "Chemical",
|
50
|
+
"450" => "Printing and Publishing",
|
51
|
+
"460" => "Food Product",
|
52
|
+
"470" => "Electronics and Instrument",
|
53
|
+
"480" => "Glass, Pottery, and Mineral",
|
54
|
+
"490" => "Pulp and Paper Mill",
|
55
|
+
"510" => "Marine",
|
56
|
+
"520" => "Railroad",
|
57
|
+
"530" => "Ground Transportation and Transit",
|
58
|
+
"540" => "Postal Express and Message Delivery",
|
59
|
+
"550" => "Air Transport",
|
60
|
+
"560" => "General Distribution",
|
61
|
+
"570" => "Communications and Internet Technology",
|
62
|
+
"580" => "Information Service",
|
63
|
+
"590" => "Video, Audio, and Film Production",
|
64
|
+
"610" => "Health Services",
|
65
|
+
"613" => "Incarcerated",
|
66
|
+
"620" => "Education and Research",
|
67
|
+
"630" => "Performing arts, Recreation, and Tourism",
|
68
|
+
"631" => "Freelance and Temporary",
|
69
|
+
"640" => "Food and Retail Workers",
|
70
|
+
"650" => "Financial Office",
|
71
|
+
"651" => "Government",
|
72
|
+
"660" => "Retail",
|
73
|
+
"670" => "Utility and Sanitation",
|
74
|
+
"690" => "Sex Industry"
|
75
|
+
}
|
76
|
+
|
77
|
+
def self.divisions
|
78
|
+
@@DIV
|
79
|
+
end
|
80
|
+
|
81
|
+
@@MAP = {
|
82
|
+
"uber" => ["631"],
|
83
|
+
"driver" => ["530","540","631"],
|
84
|
+
"pedicabber" => ["530"],
|
85
|
+
"courier" => ["540"],
|
86
|
+
"dancer" => ["630","690"],
|
87
|
+
"entertainer" => ["630","690"],
|
88
|
+
"onlyfans" => ["630","690"],
|
89
|
+
"farmer" => ["110"],
|
90
|
+
"artist" => ["631"],
|
91
|
+
"cook" => ["460","640"],
|
92
|
+
"chef" => ["640"],
|
93
|
+
"bartender" => ["640"],
|
94
|
+
"barista" => ["640"],
|
95
|
+
"writer" => ["450"],
|
96
|
+
"fisherman" => ["130"],
|
97
|
+
"landscaper" => ["340"],
|
98
|
+
"pilot" => ["550"],
|
99
|
+
"sailor" => ["510"],
|
100
|
+
"construction" => ["310"],
|
101
|
+
"accountant" => ["650"],
|
102
|
+
"nurse" => ["610"],
|
103
|
+
"orderly" => ["610"],
|
104
|
+
"doctor" => ["610"],
|
105
|
+
"busser" => ["670"],
|
106
|
+
"musician" => ["630"],
|
107
|
+
"performer" => ["630"],
|
108
|
+
"character" => ["630"],
|
109
|
+
"producer" => ["590"],
|
110
|
+
"sales" => ["660"],
|
111
|
+
"fundraiser" => ["580"],
|
112
|
+
"influencer" => ["580"],
|
113
|
+
"programmer" => ["570"],
|
114
|
+
"developer" => ["570"],
|
115
|
+
"teacher" => ["620"],
|
116
|
+
"clerk" => ["660"],
|
117
|
+
"budtender" => ["660"]
|
118
|
+
}
|
119
|
+
|
120
|
+
def self.jobs
|
121
|
+
[ @@MAP.keys, @@DIV.values ].flatten
|
122
|
+
end
|
123
|
+
|
124
|
+
def self.job k, j
|
125
|
+
if !@@MAP.has_key? k.to_s
|
126
|
+
@@MAP[k.to_s] = []
|
127
|
+
end
|
128
|
+
@@MAP[k.to_s] << j
|
129
|
+
end
|
130
|
+
|
131
|
+
def self.[] x
|
132
|
+
if @@MAP.has_key? x.to_s
|
133
|
+
o = {}
|
134
|
+
@@MAP[x.to_s].each { |e| o[e] = @@DIV[e] }
|
135
|
+
return o
|
136
|
+
elsif @@DIV.has_key? x.to_s
|
137
|
+
return { x.to_s => @@DIV[x.to_s] }
|
138
|
+
elsif @@DIV.has_value? x.to_s.capitalize
|
139
|
+
xx = @@DIV.key(x.to_s.capitalize)
|
140
|
+
return { xx => x.to_s.capitalize }
|
141
|
+
else
|
142
|
+
return false
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
data/sig/iww.rbs
ADDED
metadata
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: iww
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Erik Olson
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-02-18 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: A helpful ruby library to do union division lookups by job, number, or
|
14
|
+
description.
|
15
|
+
email:
|
16
|
+
- xorgnak@gmail.com
|
17
|
+
executables: []
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- CHANGELOG.md
|
22
|
+
- CODE_OF_CONDUCT.md
|
23
|
+
- LICENSE.txt
|
24
|
+
- README.md
|
25
|
+
- Rakefile
|
26
|
+
- iww.gemspec
|
27
|
+
- lib/iww.rb
|
28
|
+
- lib/iww/version.rb
|
29
|
+
- sig/iww.rbs
|
30
|
+
homepage: https://github.com/xorgnak/iww
|
31
|
+
licenses:
|
32
|
+
- MIT
|
33
|
+
metadata:
|
34
|
+
homepage_uri: https://github.com/xorgnak/iww
|
35
|
+
source_code_uri: https://github.com/xorgnak/iww
|
36
|
+
changelog_uri: https://github.com/xorgnak/iww
|
37
|
+
post_install_message:
|
38
|
+
rdoc_options: []
|
39
|
+
require_paths:
|
40
|
+
- lib
|
41
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 2.6.0
|
46
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
48
|
+
- - ">="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '0'
|
51
|
+
requirements: []
|
52
|
+
rubygems_version: 3.3.15
|
53
|
+
signing_key:
|
54
|
+
specification_version: 4
|
55
|
+
summary: One big union for ruby.
|
56
|
+
test_files: []
|