rufio 0.40.0 → 0.41.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.
data/publish_gem.zsh DELETED
@@ -1,131 +0,0 @@
1
- #!/bin/zsh
2
-
3
- # Gem Build & Push Script
4
- # Usage: ./publish_gem.zsh [version]
5
-
6
- set -e # Exit on any error
7
-
8
- # Colors for output
9
- RED='\033[0;31m'
10
- GREEN='\033[0;32m'
11
- YELLOW='\033[1;33m'
12
- BLUE='\033[0;34m'
13
- NC='\033[0m' # No Color
14
-
15
- # Function to print colored output
16
- print_status() {
17
- echo -e "${BLUE}[INFO]${NC} $1"
18
- }
19
-
20
- print_success() {
21
- echo -e "${GREEN}[SUCCESS]${NC} $1"
22
- }
23
-
24
- print_warning() {
25
- echo -e "${YELLOW}[WARNING]${NC} $1"
26
- }
27
-
28
- print_error() {
29
- echo -e "${RED}[ERROR]${NC} $1"
30
- }
31
-
32
- # Check if we're in the correct directory
33
- if [[ ! -f "rufio.gemspec" ]]; then
34
- print_error "rufio.gemspec not found. Please run this script from the project root directory."
35
- exit 1
36
- fi
37
-
38
- # Get current version from version.rb
39
- CURRENT_VERSION=$(ruby -r ./lib/rufio/version -e "puts Rufio::VERSION")
40
- print_status "Current version: $CURRENT_VERSION"
41
-
42
- # Use provided version or current version
43
- VERSION=${1:-$CURRENT_VERSION}
44
- print_status "Publishing version: $VERSION"
45
-
46
- # Confirm before proceeding
47
- echo
48
- read "REPLY?Do you want to proceed with publishing version $VERSION? (y/N): "
49
- if [[ ! $REPLY =~ ^[Yy]$ ]]; then
50
- print_warning "Aborted by user."
51
- exit 0
52
- fi
53
-
54
- echo
55
- print_status "Starting gem publication process..."
56
-
57
- # Step 1: Run tests
58
- print_status "Running tests..."
59
- if ! bundle exec rake test; then
60
- print_error "Tests failed. Aborting publication."
61
- exit 1
62
- fi
63
- print_success "All tests passed!"
64
-
65
- # Step 2: Clean up old gem files
66
- print_status "Cleaning up old gem files..."
67
- rm -f *.gem
68
- print_success "Cleanup completed."
69
-
70
- # Step 3: Build gem
71
- print_status "Building gem..."
72
- if ! bundle exec gem build rufio.gemspec; then
73
- print_error "Gem build failed."
74
- exit 1
75
- fi
76
-
77
- # Find the built gem file
78
- GEM_FILE=$(ls rufio-*.gem | head -n 1)
79
- if [[ -z "$GEM_FILE" ]]; then
80
- print_error "No gem file found after build."
81
- exit 1
82
- fi
83
-
84
- print_success "Gem built successfully: $GEM_FILE"
85
-
86
- # Step 4: Verify gem contents (optional)
87
- print_status "Gem contents:"
88
- gem contents $GEM_FILE | head -10
89
- echo "..."
90
-
91
- # Step 5: Final confirmation
92
- echo
93
- read "REPLY?Push $GEM_FILE to RubyGems? (y/N): "
94
- if [[ ! $REPLY =~ ^[Yy]$ ]]; then
95
- print_warning "Gem build completed but not published."
96
- print_status "You can manually push later with: gem push $GEM_FILE"
97
- exit 0
98
- fi
99
-
100
- # Step 6: Push to RubyGems
101
- print_status "Pushing gem to RubyGems..."
102
- if ! gem push $GEM_FILE; then
103
- print_error "Gem push failed."
104
- exit 1
105
- fi
106
-
107
- print_success "Gem published successfully!"
108
-
109
- # Step 7: Create git tag if version was provided
110
- if [[ -n "$1" ]]; then
111
- print_status "Creating git tag v$VERSION..."
112
- if git tag "v$VERSION" 2>/dev/null; then
113
- print_success "Tag v$VERSION created."
114
- read "REPLY?Push tag to remote? (y/N): "
115
- if [[ $REPLY =~ ^[Yy]$ ]]; then
116
- git push origin "v$VERSION"
117
- print_success "Tag pushed to remote."
118
- fi
119
- else
120
- print_warning "Tag v$VERSION already exists or failed to create."
121
- fi
122
- fi
123
-
124
- # Step 8: Cleanup
125
- print_status "Cleaning up gem file..."
126
- rm -f $GEM_FILE
127
-
128
- echo
129
- print_success "Publication completed!"
130
- print_status "Gem should be available at: https://rubygems.org/gems/rufio"
131
- print_status "Install with: gem install rufio"